[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M788NVR7X4BYNGZK32ZNQ8VB":3,"skill-same:01M788NVR7X4BYNGZK32ZNQ8VB":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M788NVR7X4BYNGZK32ZNQ8VB","call-chain-tracing",null,"Trace a request or data value hop-by-hop across services, packages, and logs to find where it's transformed, filtered, or dropped. Use when asked \"how does X call Y\", \"where does this value get lost\u002Ffiltered\", \"trace this request\u002Fcustomer\u002Forder ID\", \"which service is dropping the field\", or when debugging a failure that could live at any hop in a multi-service flow.","jingchaodev\u002Fskills-lab","jingchaodev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8307474?v=4","01M788N3PES0P1DGEKSE9ZYDSD","chao","01M788N3QH1AYYGWKFG9XTX3WF",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Fskills\u002Fcall-chain-tracing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: call-chain-tracing\ndescription: Trace a request or data value hop-by-hop across services, packages, and logs to find where it's transformed, filtered, or dropped. Use when asked \"how does X call Y\", \"where does this value get lost\u002Ffiltered\", \"trace this request\u002Fcustomer\u002Forder ID\", \"which service is dropping the field\", or when debugging a failure that could live at any hop in a multi-service flow.\n---\n\n# Call-Chain Tracing\n\nFollow one thing — a request, a field, an ID — across boundaries until you find\nwhere reality diverges from expectation. Works two ways, usually together:\n\n- **Static trace** (code): read the source hop-by-hop to map the intended flow.\n- **Dynamic trace** (logs): follow a correlation ID across services to see what\n  *actually* happened at runtime.\n\nThe discipline is the same: **pick one thread, follow it across every boundary,\nverify each hop instead of assuming.**\n\n## Step 0: Frame the Question\n\nWrite down what you're tracing and what would count as an answer *before* you\nstart. Vague goals produce vague traces.\n\n| Question shape | What you're hunting for |\n|----------------|-------------------------|\n| \"How does A reach B?\" | The full path and every intermediary |\n| \"Where does field X get dropped?\" | The hop where X is present on input but absent on output |\n| \"Why is request R failing?\" | The first hop where R errors or gets unexpected data |\n| \"Does A go through B or straight to C?\" | The actual next-hop, not the assumed one |\n\n## Static Trace: Following Code Across Boundaries\n\n### Step 1: Find the entry point\n\nStart at the known caller. Read it to find:\n- Imports — which client\u002Fwrapper\u002FSDK it uses.\n- The outbound call — method name, request builder, what data goes in.\n- Config\u002Fdependency declarations — what it's wired to talk to.\n\n### Step 2: Follow the client to the next hop\n\nFor each hop, locate the client class and read *what it actually calls\ndownstream* — don't stop at the wrapper.\n\n```bash\n# ripgrep is your primary tool. Find the class\u002Fhandler, then read it.\nrg -n \"class PaymentClient\" --type java\nrg -n \"callOperation|\\.query\\(|\\.invoke\\(|httpClient\" src\u002Fpayment\u002F\n```\n\nCapture at each hop: **what's sent, what's transformed, what's filtered, error\nhandling, and timeout\u002Fretry config.**\n\n### Step 3: Jump to the receiving service\n\nConfirm the dependency (build\u002Fconfig file), then find the handler that receives\nthe call:\n\n```bash\nrg -n \"PaymentRequest|\u002Fv1\u002Fcharge|handleCharge\" src\u002F --type-add 'src:*.{java,ts,py,go}' -tsrc\n```\n\n### Step 4: Repeat until a leaf\n\nKeep hopping until you reach one of:\n- An external boundary (a datastore, a third-party API, a queue).\n- The answer (the hop where the value is transformed\u002Fdropped\u002Fthe bug lives).\n- A dead end (no further downstream call).\n\n### Step 5: Draw the chain with data annotations\n\nMake the transformation at each hop explicit:\n\n```\nServiceA        sends  {userId, filters:[\"active\"]}\n → ClientWrapper adds   timeout=5s, auth header\n   → ServiceB   receives filter, queries store\n     → DataStore returns full row set\n   ← ServiceB   maps rows → DTO, DROPS \"active\" filter  ← bug is here\n ← ClientWrapper returns JSON\n← ServiceA      maps to domain model\n```\n\n### What to look for at each hop\n\n| Looking for | Where it lives |\n|-------------|----------------|\n| What data is sent | Method params, request builder, serialization |\n| What gets filtered | Builder conditionals, `if (x != null)`, default constants |\n| What's transformed | Mapper classes, `.map()`, response parsing |\n| Error handling | try\u002Fcatch, fallbacks, swallowed exceptions |\n| Config | Timeouts, retries, feature flags |\n\n## Dynamic Trace: Following an ID Through Logs\n\nWhen you have a runtime symptom, trace a **correlation ID** across service logs.\n\n### Step 1: Pick the correlation ID\n\nBest IDs are the ones that survive across service boundaries:\n- **Request\u002Ftrace ID** — propagated in headers (`X-Request-Id`, `traceId`,\n  W3C `traceparent`). Best for a single request's journey.\n- **Entity ID** — a customer\u002Forder\u002Faccount ID. Best for \"what happened to this\n  thing over time\" across many requests.\n- **Session\u002Fjob ID** — for async or batch flows.\n\nIf services don't propagate a shared ID, that gap is itself a finding — you may\nhave to bridge on timestamps + entity ID.\n\n### Step 2: Query every log source in the path at once\n\nSearch all relevant log groups\u002Fstreams together and sort by time so you see the\ninterleaved cross-service story:\n\n```bash\n# CloudWatch Logs Insights across multiple groups (see aws-cli-safety skill)\naws logs start-query \\\n  --log-group-names \"svc-a-app\" \"svc-b-app\" \"svc-b-requests\" \\\n  --start-time $(date -v-24H +%s) --end-time $(date +%s) \\\n  --query-string 'fields @timestamp, @log, @message | filter @message like \u002FREQUEST_ID\u002F | sort @timestamp asc | limit 200'\n# → poll: aws logs get-query-results --query-id \u003CID>\n\n# Or local\u002Faggregated logs\nrg -n \"req-8f2a1c\" \u002Fvar\u002Flog\u002F*\u002Fapp.log | sort -t' ' -k1\n```\n\nThe `@log`\u002Fsource field tells you which service each line came from — that's\nyour hop boundary in the timeline.\n\n### Step 3: Read the timeline for the divergence\n\nWalk the interleaved log lines and find the first place expected != actual:\n\n| Symptom in the timeline | Likely meaning |\n|-------------------------|----------------|\n| ID appears in A, never in B | A never called B (wrong branch, feature flag off, dropped message) |\n| ID in A and B, error in B | B received it but failed — read B's error\u002Fstack |\n| ID reaches B, response empty | Upstream dependency of B failed, or filter removed the data |\n| ID present, wrong value | A transformation between the two log points mangled it |\n| Big time gap between hops | Timeout\u002Fretry\u002Fqueue backlog between services |\n\n### Step 4: Confirm state at the boundary\n\nLogs tell you flow; a point read confirms end state. Check the datastore\ndirectly (read-only) to distinguish \"never written\" from \"written then lost\":\n\n```bash\naws dynamodb get-item --table-name profiles --key '{\"id\":{\"S\":\"REQUEST_ID\"}}'\n```\n\n## When to Parallelize\n\n- **Single chain (3–5 hops):** do it yourself, sequentially — each hop depends\n  on the last.\n- **Multiple independent chains:** fan out one worker per chain, then merge.\n- **Comparing two paths:** trace both, then diff the hop lists.\n\n## Tips\n\n- **Trace one thread, not the whole system.** One ID, one field, one request — breadth comes from following it fully, not from reading everything.\n- **Verify every hop; never assume the obvious path.** Services take surprising routes (through a gateway, a queue, a cache) — confirm the actual next-hop in code or logs.\n- **Static + dynamic together.** Code shows the *intended* flow; logs show the *actual* flow. The bug is usually where they disagree.\n- **Don't stop at the wrapper.** A client wrapper hides the real downstream call — read what it actually invokes.\n- **A missing correlation ID is a finding.** If you can't follow one ID across a boundary, the tracing gap is worth fixing (and forces you onto timestamps).\n- **Read the divergence, not the whole log.** Find the first hop where expected != actual; everything after is usually downstream fallout.\n- **Point-read the datastore to disambiguate** \"never written\" vs \"written then overwritten\u002Fdeleted\".\n","# Call-Chain Tracing\n\nFollow one thing — a request, a field, an ID — across boundaries until you find\nwhere reality diverges from expectation. Works two ways, usually together:\n\n- **Static trace** (code): read the source hop-by-hop to map the intended flow.\n- **Dynamic trace** (logs): follow a correlation ID across services to see what\n  *actually* happened at runtime.\n\nThe discipline is the same: **pick one thread, follow it across every boundary,\nverify each hop instead of assuming.**\n\n## Step 0: Frame the Question\n\nWrite down what you're tracing and what would count as an answer *before* you\nstart. Vague goals produce vague traces.\n\n| Question shape | What you're hunting for |\n|----------------|-------------------------|\n| \"How does A reach B?\" | The full path and every intermediary |\n| \"Where does field X get dropped?\" | The hop where X is present on input but absent on output |\n| \"Why is request R failing?\" | The first hop where R errors or gets unexpected data |\n| \"Does A go through B or straight to C?\" | The actual next-hop, not the assumed one |\n\n## Static Trace: Following Code Across Boundaries\n\n### Step 1: Find the entry point\n\nStart at the known caller. Read it to find:\n- Imports — which client\u002Fwrapper\u002FSDK it uses.\n- The outbound call — method name, request builder, what data goes in.\n- Config\u002Fdependency declarations — what it's wired to talk to.\n\n### Step 2: Follow the client to the next hop\n\nFor each hop, locate the client class and read *what it actually calls\ndownstream* — don't stop at the wrapper.\n\n```bash\n# ripgrep is your primary tool. Find the class\u002Fhandler, then read it.\nrg -n \"class PaymentClient\" --type java\nrg -n \"callOperation|\\.query\\(|\\.invoke\\(|httpClient\" src\u002Fpayment\u002F\n```\n\nCapture at each hop: **what's sent, what's transformed, what's filtered, error\nhandling, and timeout\u002Fretry config.**\n\n### Step 3: Jump to the receiving service\n\nConfirm the dependency (build\u002Fconfig file), then find the handler that receives\nthe call:\n\n```bash\nrg -n \"PaymentRequest|\u002Fv1\u002Fcharge|handleCharge\" src\u002F --type-add 'src:*.{java,ts,py,go}' -tsrc\n```\n\n### Step 4: Repeat until a leaf\n\nKeep hopping until you reach one of:\n- An external boundary (a datastore, a third-party API, a queue).\n- The answer (the hop where the value is transformed\u002Fdropped\u002Fthe bug lives).\n- A dead end (no further downstream call).\n\n### Step 5: Draw the chain with data annotations\n\nMake the transformation at each hop explicit:\n\n```\nServiceA        sends  {userId, filters:[\"active\"]}\n → ClientWrapper adds   timeout=5s, auth header\n   → ServiceB   receives filter, queries store\n     → DataStore returns full row set\n   ← ServiceB   maps rows → DTO, DROPS \"active\" filter  ← bug is here\n ← ClientWrapper returns JSON\n← ServiceA      maps to domain model\n```\n\n### What to look for at each hop\n\n| Looking for | Where it lives |\n|-------------|----------------|\n| What data is sent | Method params, request builder, serialization |\n| What gets filtered | Builder conditionals, `if (x != null)`, default constants |\n| What's transformed | Mapper classes, `.map()`, response parsing |\n| Error handling | try\u002Fcatch, fallbacks, swallowed exceptions |\n| Config | Timeouts, retries, feature flags |\n\n## Dynamic Trace: Following an ID Through Logs\n\nWhen you have a runtime symptom, trace a **correlation ID** across service logs.\n\n### Step 1: Pick the correlation ID\n\nBest IDs are the ones that survive across service boundaries:\n- **Request\u002Ftrace ID** — propagated in headers (`X-Request-Id`, `traceId`,\n  W3C `traceparent`). Best for a single request's journey.\n- **Entity ID** — a customer\u002Forder\u002Faccount ID. Best for \"what happened to this\n  thing over time\" across many requests.\n- **Session\u002Fjob ID** — for async or batch flows.\n\nIf services don't propagate a shared ID, that gap is itself a finding — you may\nhave to bridge on timestamps + entity ID.\n\n### Step 2: Query every log source in the path at once\n\nSearch all relevant log groups\u002Fstreams together and sort by time so you see the\ninterleaved cross-service story:\n\n```bash\n# CloudWatch Logs Insights across multiple groups (see aws-cli-safety skill)\naws logs start-query \\\n  --log-group-names \"svc-a-app\" \"svc-b-app\" \"svc-b-requests\" \\\n  --start-time $(date -v-24H +%s) --end-time $(date +%s) \\\n  --query-string 'fields @timestamp, @log, @message | filter @message like \u002FREQUEST_ID\u002F | sort @timestamp asc | limit 200'\n# → poll: aws logs get-query-results --query-id \u003CID>\n\n# Or local\u002Faggregated logs\nrg -n \"req-8f2a1c\" \u002Fvar\u002Flog\u002F*\u002Fapp.log | sort -t' ' -k1\n```\n\nThe `@log`\u002Fsource field tells you which service each line came from — that's\nyour hop boundary in the timeline.\n\n### Step 3: Read the timeline for the divergence\n\nWalk the interleaved log lines and find the first place expected != actual:\n\n| Symptom in the timeline | Likely meaning |\n|-------------------------|----------------|\n| ID appears in A, never in B | A never called B (wrong branch, feature flag off, dropped message) |\n| ID in A and B, error in B | B received it but failed — read B's error\u002Fstack |\n| ID reaches B, response empty | Upstream dependency of B failed, or filter removed the data |\n| ID present, wrong value | A transformation between the two log points mangled it |\n| Big time gap between hops | Timeout\u002Fretry\u002Fqueue backlog between services |\n\n### Step 4: Confirm state at the boundary\n\nLogs tell you flow; a point read confirms end state. Check the datastore\ndirectly (read-only) to distinguish \"never written\" from \"written then lost\":\n\n```bash\naws dynamodb get-item --table-name profiles --key '{\"id\":{\"S\":\"REQUEST_ID\"}}'\n```\n\n## When to Parallelize\n\n- **Single chain (3–5 hops):** do it yourself, sequentially — each hop depends\n  on the last.\n- **Multiple independent chains:** fan out one worker per chain, then merge.\n- **Comparing two paths:** trace both, then diff the hop lists.\n\n## Tips\n\n- **Trace one thread, not the whole system.** One ID, one field, one request — breadth comes from following it fully, not from reading everything.\n- **Verify every hop; never assume the obvious path.** Services take surprising routes (through a gateway, a queue, a cache) — confirm the actual next-hop in code or logs.\n- **Static + dynamic together.** Code shows the *intended* flow; logs show the *actual* flow. The bug is usually where they disagree.\n- **Don't stop at the wrapper.** A client wrapper hides the real downstream call — read what it actually invokes.\n- **A missing correlation ID is a finding.** If you can't follow one ID across a boundary, the tracing gap is worth fixing (and forces you onto timestamps).\n- **Read the divergence, not the whole log.** Find the first hop where expected != actual; everything after is usually downstream fallout.\n- **Point-read the datastore to disambiguate** \"never written\" vs \"written then overwritten\u002Fdeleted\".\n",{"name":5,"description":7},"main","44b1acb2c22ab1e94663691dda7d7739f1b83cf6","skills\u002Fcall-chain-tracing",0,"https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab","https:\u002F\u002Fgithub.com\u002Fjingchaodev","https:\u002F\u002Fx.com\u002Fcifra1902","Developer","2026-07-13 09:03:55",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add jingchaodev\u002Fskills-lab --skill call-chain-tracing",{"tool":39,"command":40},"bunx","bunx skills add jingchaodev\u002Fskills-lab --skill call-chain-tracing",{"tool":42,"command":43},"pnpm","pnpm dlx skills add jingchaodev\u002Fskills-lab --skill call-chain-tracing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Fskills\u002Fcall-chain-tracing\u002FSKILL.md",true,[],[48,55,62,69,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M788VYAVHEH5QAV7T1Z8QFV9","default-skill","Valid default cwd skill.","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fdefault_cwd\u002Fskills\u002Fdefault-skill\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M788VVHF3TC2RY65NVPR26DN","clean-two","Another valid skill with a quoted trigger phrase \"specific action\".","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fclean_skills\u002Fclean-two\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M788VRPGJXZ09X9AM1ZPNAHA","clean-one","Use when the user needs a clean example.","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fclean_skills\u002Fclean-one\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M788VPP8BFKCBXDFRHMP67WH","wrong-frontmatter","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad_skills\u002Fwrong-frontmatter\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M788VKP781ZRGKXVMHZFR062","trigger-two","Use for the exact phrase \"panic button\".","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad_skills\u002Ftrigger-two\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M788VJBR5Q14W6MJB2DWRSVE","trigger-one","Use when someone says \"panic button\".","https:\u002F\u002Fgithub.com\u002Fjingchaodev\u002Fskills-lab\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad_skills\u002Ftrigger-one\u002FSKILL.md",[],[]]