skills/practicalswan/agent-skills/code-examples-sync

code-examples-sync

SKILL.md

Code Example Synchronization

Use this skill when docs contain code snippets that are likely to drift from the real implementation.

Activation Conditions

  • Function signatures changed
  • Imports or package names changed
  • Request or response contracts changed
  • Framework guidance or recommended patterns changed
  • A doc snippet compiles conceptually but no longer matches the codebase

Workflow

  1. Find the canonical implementation first.
  2. Update every affected snippet in docs, examples, and READMEs.
  3. Verify syntax, imports, and expected outputs.
  4. Note any intentional divergence, such as simplified tutorial snippets.

Quality Checklist

  • Snippet matches current API shape
  • Imports and package names are current
  • Async, error handling, and setup steps still make sense
  • Output examples match current behavior
  • Duplicate snippets across docs were updated together

References & Resources

Documentation

Scripts

  • Example Sync Check - Audit Markdown files for untyped fences, placeholder text, and obviously stale examples

Related Skills

Skill Relationship
documentation-verification Validate code examples before merging docs
documentation-authoring Keep authored docs in sync with code changes
breaking-changes-management Update examples after breaking API changes
Weekly Installs
7
GitHub Stars
2
First Seen
Feb 26, 2026
Installed on
opencode7
github-copilot7
codex7
amp7
cline7
kimi-cli7