/document-service
This skill should be used when the user asks to \"analyze this codebase\", \"document this service\", \"generate technical docs\", \"I inherited this code\", \"help me understand this system\", \"create docs for this project\", \"what does this system look like\", \"onboard me
$ npx -y skills add awslabs/agent-plugins --skill document-service --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/document-service
Context preview
The summary Claude sees to decide when to auto-load this skill.
This skill should be used when the user asks to \"analyze this codebase\", \"document this service\", \"generate technical docs\", \"I inherited this code\", \"help me understand this system\", \"create docs for this project\", \"what does this system look like\", \"onboard me
SKILL.md
document-service.SKILL.mdname: document-service
description: "This skill should be used when the user asks to \"analyze this codebase\", \"document this service\", \"generate technical docs\", \"I inherited this code\", \"help me understand this system\", \"create docs for this project\", \"what does this system look like\", \"onboard me to this codebase\", \"this codebase has no docs\", \"visualize the architecture from code\", or any explicit request to produce structured documentation or architecture diagrams from an existing codebase. Specifically optimized for AWS workloads (CDK, CloudFormation, Terraform) with source-of-truth citations. Do NOT activate for code reviews, single-function explanations, generating new code, or general coding tasks."
license: Apache-2.0
Document Service
Analyze codebases to produce structured technical documentation and architecture diagrams with source-of-truth citations. Every finding links back to the exact file and line it was derived from. Optimized for AWS workloads but works with any codebase.
Core Principles
- **Explain WHY, not just WHAT.** The reader inherited this codebase and has zero context. Listing components is not enough — explain why the architecture is shaped this way. Search for code comments, TODOs, and commit messages that reveal design rationale. When no rationale exists, mark it `[RATIONALE UNKNOWN]`.
- **Trace end-to-end flows.** For every API endpoint or message handler, trace the complete request path from entry to response. Note every intermediate step, transformation, timeout, and failure point. This is the "if it breaks at 3am, where do I look?" analysis.
- **Deep-dive complex logic.** Identify the most complex or domain-specific code paths (ML pipelines, business rule engines, state machines, custom algorithms). Document HOW they work at the implementation level — the algorithm, key parameters, edge cases, and where production bugs will occur. Surface-level summaries of complex code provide no value over a naive AI prompt.
- **Surface implicit knowledge.** Look for hardcoded values, magic numbers, environment-dependent behavior, and undocumented assumptions. These are the tribal knowledge items that disappear when teams leave.
- **Every claim must be traceable.** Include `file:line` citations for every finding. See [citation-format.md](references/citation-format.md). Verify citations precisely — re-read the cited file and confirm the line number is within ±3 lines. Anchor with function/variable names.
- **Code is the source of truth.** Document what actually exists in code, not what READMEs or wikis claim. Flag every discrepancy between documentation and reality.
- **Mark unknowns and risks explicitly.** Use `[UNKNOWN]` for items not inferable from code, `[RISK]` for unhandled failure modes, `[INFERRED]` for educated guesses, `[RATIONALE UNKNOWN]` for unexplained architecture choices. Omitting markers undermines trust.
- **Verify quantitative claims.** List directory entries programmatically and use exact counts.
Workflow
The workflow runs autonomously from Step 2 onward. Step 1 is the only interactive step.
Step 1: Gather Context
Gather from the user:
- Target directory or service to analyze
- Any existing documentation, design docs, or business context (accept "nothing" — this skill is designed for undocumented codebases)
If existing docs are provided, read them first to establish baseline context. If the target directory and context are already known (e.g., provided via automation or a pre-configured prompt), skip the interactive step and proceed directly to Step 2.
Check whether `CODEBASE_ANALYSIS.md` already exists at the output path. If so, ask the user: "Overwrite or write to a different filename?" Resolve this before proceeding — the rest of the workflow runs autonomously.
Step 2: Build File Tree and Detect Project Type
1. List all files recursively in the target directory 2. Apply exclusion patterns from [exclusion-patterns.md](references/exclusion-patterns.md). Also respect `.gitignore`. 3. Detect project type and framework from characteristic files. See [discovery-patterns.md](references/discovery-patterns.md). 4. Identify entry points based on detected project type. See [discovery-patterns.md](references/discovery-patterns.md). 5. Read the README, CLAUDE.md, or AGENTS.md if present — these contain project context. 6. Check git branch names (`git branch -a`) for strategic context (e.g., a `dev/rust` branch signals a language migration in progress). Note active branches in the Architecture Overview.
Step 3: Generate Documentation Outline
Produce a hierarchical outline mapping each documentation section to specific source files:
## Documentation Outline
1. Architecture Overview → [entry points, IaC stack files] — explain WHY, not just WHAT
2. [Module A: detected name] → [source files for module A]
3. [Module B: detected name] → [source files for module B]
4. Shared Utilities → [shared/common source files]
5. Request Lifecycle → [trace end-to-end flows through the system]
6. Domain Logic Deep-Dive → [core services at implementation level: algorithms, parameters, edge cases]
7. Startup and Initialization → [boot sequence, model loading, cache warmup, dependency checks]
8. API Contracts → [route definitions, OpenAPI specs]
9. Data Models → [schema files, ORM models]
10. Deployment → [IaC files, Dockerfiles]
11. Configuration → [config files, .env.example, prompt templates, YAML configs, secrets refs]
12. Monitoring and Observability → [log groups, metrics, tracing, alarms, dashboards]
13. Security → [auth, encryption, IAM, network isolation]
14. Local Development → [how to run/test locally, CPU fallback, dev environment setup]
15. Discrepancies → (cross-reference README/metadata vs actual code)
16. Failure Modes → (cross-cutting — include detection + recovery)
17. Timeout and Dependency Chain → (map cascading timeouts across layers)
Follow the section structure in [technical-doc-t
Read more
name: document-service description: "This skill should be used when the user asks to \"analyze this codebase\", \"document this service\", \"generate technical docs\", \"I inherited this code\", \"help me understand this system\", \"create docs for this project\", \"what does this system look like\", \"onboard me to this codebase\", \"this codebase has no docs\", \"visualize the architecture from code\", or any explicit request to produce structured documentation or architecture diagrams from an existing codebase. Specifically optimized for AWS workloads (CDK, CloudFormation, Terraform) with source-of-truth citations. Do NOT activate for code reviews, single-function explanations, generating new code, or general coding tasks." license: Apache-2.0
Document Service
Analyze codebases to produce structured technical documentation and architecture diagrams with source-of-truth citations. Every finding links back to the exact file and line it was derived from. Optimized for AWS workloads but works with any codebase.
Core Principles
- **Explain WHY, not just WHAT.** The reader inherited this codebase and has zero context. Listing components is not enough — explain why the architecture is shaped this way. Search for code comments, TODOs, and commit messages that reveal design rationale. When no rationale exists, mark it `[RATIONALE UNKNOWN]`.
- **Trace end-to-end flows.** For every API endpoint or message handler, trace the complete request path from entry to response. Note every intermediate step, transformation, timeout, and failure point. This is the "if it breaks at 3am, where do I look?" analysis.
- **Deep-dive complex logic.** Identify the most complex or domain-specific code paths (ML pipelines, business rule engines, state machines, custom algorithms). Document HOW they work at the implementation level — the algorithm, key parameters, edge cases, and where production bugs will occur. Surface-level summaries of complex code provide no value over a naive AI prompt.
- **Surface implicit knowledge.** Look for hardcoded values, magic numbers, environment-dependent behavior, and undocumented assumptions. These are the tribal knowledge items that disappear when teams leave.
- **Every claim must be traceable.** Include `file:line` citations for every finding. See [citation-format.md](references/citation-format.md). Verify citations precisely — re-read the cited file and confirm the line number is within ±3 lines. Anchor with function/variable names.
- **Code is the source of truth.** Document what actually exists in code, not what READMEs or wikis claim. Flag every discrepancy between documentation and reality.
- **Mark unknowns and risks explicitly.** Use `[UNKNOWN]` for items not inferable from code, `[RISK]` for unhandled failure modes, `[INFERRED]` for educated guesses, `[RATIONALE UNKNOWN]` for unexplained architecture choices. Omitting markers undermines trust.
- **Verify quantitative claims.** List directory entries programmatically and use exact counts.
Workflow
The workflow runs autonomously from Step 2 onward. Step 1 is the only interactive step.
Step 1: Gather Context
Gather from the user:
- Target directory or service to analyze
- Any existing documentation, design docs, or business context (accept "nothing" — this skill is designed for undocumented codebases)
If existing docs are provided, read them first to establish baseline context. If the target directory and context are already known (e.g., provided via automation or a pre-configured prompt), skip the interactive step and proceed directly to Step 2.
Check whether `CODEBASE_ANALYSIS.md` already exists at the output path. If so, ask the user: "Overwrite or write to a different filename?" Resolve this before proceeding — the rest of the workflow runs autonomously.
Step 2: Build File Tree and Detect Project Type
1. List all files recursively in the target directory 2. Apply exclusion patterns from [exclusion-patterns.md](references/exclusion-patterns.md). Also respect `.gitignore`. 3. Detect project type and framework from characteristic files. See [discovery-patterns.md](references/discovery-patterns.md). 4. Identify entry points based on detected project type. See [discovery-patterns.md](references/discovery-patterns.md). 5. Read the README, CLAUDE.md, or AGENTS.md if present — these contain project context. 6. Check git branch names (`git branch -a`) for strategic context (e.g., a `dev/rust` branch signals a language migration in progress). Note active branches in the Architecture Overview.
Step 3: Generate Documentation Outline
Produce a hierarchical outline mapping each documentation section to specific source files:
## Documentation Outline 1. Architecture Overview → [entry points, IaC stack files] — explain WHY, not just WHAT 2. [Module A: detected name] → [source files for module A] 3. [Module B: detected name] → [source files for module B] 4. Shared Utilities → [shared/common source files] 5. Request Lifecycle → [trace end-to-end flows through the system] 6. Domain Logic Deep-Dive → [core services at implementation level: algorithms, parameters, edge cases] 7. Startup and Initialization → [boot sequence, model loading, cache warmup, dependency checks] 8. API Contracts → [route definitions, OpenAPI specs] 9. Data Models → [schema files, ORM models] 10. Deployment → [IaC files, Dockerfiles] 11. Configuration → [config files, .env.example, prompt templates, YAML configs, secrets refs] 12. Monitoring and Observability → [log groups, metrics, tracing, alarms, dashboards] 13. Security → [auth, encryption, IAM, network isolation] 14. Local Development → [how to run/test locally, CPU fallback, dev environment setup] 15. Discrepancies → (cross-reference README/metadata vs actual code) 16. Failure Modes → (cross-cutting — include detection + recovery) 17. Timeout and Dependency Chain → (map cascading timeouts across layers)
Follow the section structure in [technical-doc-t
Read this in other languages: 日本語 Generative AI can make mistakes. You should consider reviewing all output and costs generated by your chosen AI model and agentic coding assistant. See AWS Responsible AI Policy.
Other skills on agent-plugins.
- /amazon-location-service
Integrates Amazon Location Service APIs for AWS applications. Use this skill when users want to add maps (interactive MapLibre or static images); geocode addresses to coordinates or reverse geocode coordinates to addresses; calculate routes, travel times, or service areas; find
Open skill - /amplify-workflow
Build and deploy full-stack web and mobile apps with AWS Amplify Gen2
Open skill - /api-gateway
Build, manage, and operate APIs with Amazon API Gateway (REST, HTTP, and WebSocket). Triggers on phrases like: API Gateway, REST API, HTTP API, WebSocket API, custom domain, Lambda authorizer, usage plan, throttling, CORS, VPC link, private API. Also covers troubleshooting API
Open skill - /aws-lambda-durable-functions
Build resilient, long-running, multi-step applications with AWS Lambda durable functions with automatic state persistence, retry logic, and orchestration for long-running executions. Covers the critical replay model, step operations, wait/callback patterns, error handling with
Open skill - /aws-lambda-managed-instances
Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for
Open skill - /aws-lambda-microvms
Build, run, debug, and operate applications on AWS Lambda MicroVMs — Firecracker-isolated, snapshot-resumable serverless compute environments that run inside a container with up to 8-hour lifetimes. Triggers on: Lambda MicroVMs, Firecracker isolation, snapshot-resumable compute,
Open skill

