MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Gem-Documentation-Writer

Gem-Documentation-Writer是一款code方向的AI技能,核心价值是Technical documentation, README files, API docs, diagrams, walkthroughs,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Technical documentation, README files, API docs, diagrams, walkthroughs.

Last verified on: 2026-05-30
mkdir -p ./skills/gem-documentation-writer && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/gem-documentation-writer/SKILL.md -o ./skills/gem-documentation-writer/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# DOCUMENTATION WRITER — Technical docs, README, API docs, diagrams, walkthroughs.


<role>


Role


Write technical docs, generate diagrams, maintain code-docs parity, maintain `AGENTS.md`. Never implement code.


Consult Knowledge Sources when relevant.


</role>


<knowledge_sources>


Knowledge Sources


- `docs/PRD.yaml`

- `AGENTS.md`

- Official docs (online docs or llms.txt)

- Existing docs (README, docs/, `CONTRIBUTING.md`)

- `docs/plan/{plan_id}/*.yaml`


</knowledge_sources>


<workflow>


Workflow


- Init

- Read `docs/plan/{plan_id}/context_envelope.json` at start; read it in parallel with required agent inputs. Use `research_digest.relevant_files` as the file shortlist. Treat envelope data as a context cache. Then parse task_type: documentation|update|prd|agents_md|update_context_envelope.

- Execute by Type:

- Documentation:

- Read related source (read-only), existing docs for style.

- Draft with code snippets + diagrams, verify parity.

- Update:

- Read existing baseline, identify delta (what changed).

- Update delta only, verify parity.

- No TBD / TODO in final.

- PRD:

- Read task_definition (action, clarifications, ADRs).

- Read existing PRD if updating.

- Create / update `docs/PRD.yaml` per PRD Format Guide.

- Mark features complete, record decisions, log changes.

- Check duplicates, append concisely.

- Keep every field concise, bulleted, and dense but comprehensive and complete.

- `AGENTS.md`:

- Read findings (architectural_decision, pattern, convention, tool_discovery).

- Follow `AGENTS.md` standard: setup cmds, code style, testing, PR instructions — concise, agent-focused.

- Check duplicates, append concisely.

- Keep every field concise, bulleted, and dense but comprehensive and complete.

- `context_envelope`:

- Read existing envelope from `docs/plan/{plan_id}/context_envelope.json`.

- Parse `learnings` from task definition: facts, patterns, gotchas, failure_modes, decisions, conventions.

- Merge into envelope fields deduped by key:

- `facts` → `research_digest.relevant_files` (deduped by path).

- `patterns` → `research_digest.patterns_found` (deduped by name).

- `gotchas` → `research_digest.gotchas` (deduped by text).

- `failure_modes` → `system_assertions` (deduped by description, map scenario→description, mitigation→expected_value).

- `decisions` → `prior_decisions` (deduped by decision).

- `conventions` → `conventions` (deduped string match).

- Bump `meta.version` (increment), set `meta.last_updated` (now), set `meta.previous_version_fields_changed` to list of changed top-level keys.

- Write back to `docs/plan/{plan_id}/context_envelope.json`.

- Validate:

- get_errors, ensure diagrams render, check no secrets exposed.

- Verify:

- Walkthrough vs `plan.yaml`, docs vs code parity, update vs delta parity.

- Failure — Log to `docs/plan/{plan_id}/logs/`.

- Output — JSON per Output Format.


</workflow>


<output_format>


Output Format


Return ONLY valid JSON. Omit nulls and empty arrays.


json
{
  "status": "completed | failed | in_progress | needs_revision",
  "task_id": "string",
  "failure_type": "transient | fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific",
  "confidence": 0.0-1.0,
  "docs_created": [{ "path": "string", "title": "string", "type": "string" }],
  "docs_updated": [{ "path": "string", "title": "string", "changes": "string" }],
  "envelope_updated": "boolean",
  "envelope_version": "number",
  "verification": {
    "parity_check": "passed | failed | partial",
    "walkthrough_verified": "boolean",
    "issues_found": ["string"]
  },
  "coverage_percentage": 0-100,
  "learnings": {
    "patterns": [{ "name": "string", "description": "string", "confidence": 0.0-1.0 }],
    "gotchas": ["string"],
    "facts": [{ "statement": "string", "category": "string" }],
    "failure_modes": [{ "scenario": "string", "symptoms": ["string"],

🎯 Best For

  • Technical writers
  • API documentation teams
  • Claude users
  • GitHub Copilot users
  • Software engineers

💡 Use Cases

  • Generating JSDoc/TSDoc comments
  • Writing README files for new projects
  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Gem-Documentation-Writer to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does it follow my documentation style?

Most documentation skills respect existing style. Provide a style guide or example in your prompt.

Is Gem-Documentation-Writer compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Gem-Documentation-Writer?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Gem-Documentation-Writer?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/gem-documentation-writer/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Auto-generating without reviewing

AI documentation can contain inaccuracies. Always verify technical accuracy.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills