
Code Examples Sync
- 13 installs
- 7 repo stars
- Updated August 2, 2026
- practicalswan/agent-skills
code-examples-sync is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
Key points
- code-examples-sync
- AI & Agent Building
- AI-coding skill
Code Examples Sync by the numbers
- 13 all-time installs (skills.sh)
- Ranked #11,389 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/practicalswan/agent-skills --skill code-examples-syncAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 13 |
|---|---|
| repo stars | ★ 7 |
| Last updated | August 2, 2026 |
| Repository | practicalswan/agent-skills ↗ |
How do I helps with ai & agent building tasks?
Helps with ai & agent building tasks.
Who is it for?
Best when you're working on ai & agent building and need structured help with code-examples-sync.
Skip if: Teams with no ai & agent building needs, or anyone wanting a generic chat assistant without this specific workflow.
When should I use this skill?
When you need to helps with ai & agent building tasks, or when code-examples-sync is a claude code skill for ai & agent building. it helps solo builders move faster with ai-assisted development.
What you get
Structured output aligned to code-examples-sync: code-examples-sync; AI & Agent Building; AI-coding skill.
Files
Code Example Synchronization
Use this skill when docs contain code snippets that are likely to drift from the real implementation.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
Activation Conditions
Use symptom -> action triggers: when one matches, apply this skill and verify with the protocol below.
- 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.
Anti-Patterns
- Starting work before the plan or gate is clear: Execution drifts when success criteria are implied instead of explicit.
- Treating verification as optional cleanup: The last mile is where regressions and missing updates are usually hiding.
- Mixing planning, implementation, and release work in one jump: You lose the causal chain that explains why a change is safe.
Verification Protocol
Before claiming "skill applied successfully":
1. Pass/fail: The Code Examples Sync workflow starts from explicit success criteria, constraints, and stop conditions. 2. Pass/fail: Required evidence is collected before any completion, approval, or readiness claim. 3. Pass/fail: The next action follows the documented gate order without skipping review or verification steps. 4. Pressure-test scenario: Apply the workflow under time pressure with one failing check and one tempting shortcut. 5. Success metric: Zero rationalizations; blocked, failed, or unverified work is reported as such.
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
- Code Example Verification - Checks for examples, imports, outputs, and compatibility
Scripts
- Example Sync Check - Audit Markdown files for untyped fences, placeholder text, and obviously stale examples
<!-- PORTABILITY:START -->
Cross-Client Portability
This skill is written to stay usable across GitHub Copilot, Claude Code, Codex, and Gemini CLI.
- GitHub Copilot: keep the folder in a Copilot-visible skill or plugin path, or wrap the workflow as project instructions if the host does not support portable skill folders directly.
- Claude Code: keep the folder in a local skills directory or a compatible plugin or marketplace source.
- Codex: install or sync the folder into
$CODEX_HOME/skills/<skill-name>and restart Codex after major changes. - Gemini CLI: this repository generates a project command named
/skills:code-examples-syncfrom this skill. Rebuild commands withpython scripts/export-gemini-skill.py code-examples-syncand then run/commands reloadinside Gemini CLI.
<!-- PORTABILITY:END -->
<!-- MCP:START -->
MCP Availability And Fallback
Preferred MCP Server: None required
- Fallback prompt: "Use the Code Example Synchronization skill without MCP. Rely on the local
SKILL.md, bundled references or scripts, and manual verification. Show the exact commands, evidence, and final checks you used before concluding." - If the current host does not expose a matching server, use the bundled references, scripts, native toolchain, and manual workflow already described in this skill.
- Treat direct local verification, rendered output, logs, tests, or screenshots as the fallback evidence path before completion.
<!-- MCP:END -->
Related Skills
- development-workflow: Use it when the workflow also needs planning, quality gates, and delivery tracking.
- code-quality: Use it when the workflow also needs two-stage review (spec compliance first, then code quality), maintainability, and refactoring guidance.
- systematic-debugging: Use it when the workflow also needs root-cause debugging before proposing fixes.
- test-driven-development: Use it when the workflow also needs test-first implementation and regression safety.
Changelog
[2026-04-25] - Version 1.2 Verification Protocol Refresh
Added
- Added a
Verification Protocolsection with skill-specific pass/fail checks, one pressure-test scenario, and a measurable success metric. - Added guidance to leverage native parallel subagent dispatch and 200k+ context windows where available.
Changed
- Updated
SKILL.mdfrontmatter toversion: "1.2"andlast_updated: 2026-04-25. - Reframed activation guidance toward symptom -> action triggers and standardized two-stage review wording where applicable.
[2026-04-24] - Version 1.1 Refresh
Changed
- Updated the SKILL frontmatter version to
1.1for the 2026-04-24 catalog refresh.
All notable changes to this skill will be documented in this file.
[2026-04-24] - Skill Refresh
Changed
- Standardized the SKILL frontmatter with version metadata, last-updated date, tags, and a concise catalog description.
- Reformatted the portability and MCP guidance with a preferred server line, a copy-paste fallback prompt, and consistent bullet lists.
- Added a catalog-standard Anti-Patterns section and refreshed the Related Skills links at the end of the skill.
[2026-04-04] - Cross-Client Portability Refresh
Changed
- Added a standard portability note covering GitHub Copilot, Claude Code, Codex, and Gemini CLI.
- Clarified that the core workflow does not require a dedicated MCP server and can run with local tools alone.
Tested
- Validated
SKILL.mdfrontmatter, portability sections, and Gemini export readiness withpython scripts/validate-skills.py.
[2026-03-09] - Workspace Modernization
Changed
- Reworked the skill into a concise synchronization workflow centered on API drift, imports, and example integrity
Added
scripts/example-sync-check.pyfor lightweight example-drift auditing in Markdown files
[2026-02-28] — Description Rewrite & Cross-References
Changed
- Rewrote skill description to ~200 characters with clear, specific activation keywords
- Improved keyword specificity to reduce overlap with related skills
Added
## Related Skillscross-reference table with 2-4 related skills and "Use When" guidance
MIT License
Copyright (c) 2026 Sithu Win San
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Code Example Verification
Before Committing Examples
1. Syntax Check: Ensure all code examples follow correct syntax for the language
2. Compilation: Verify examples compile without errors
3. Execution: Test that examples produce expected output
4. Imports: Check that import statements reference existing modules
5. Dependencies: Verify referenced dependencies are current and available
Common Issues
- Import Errors: Module paths change, packages renamed
- Syntax Changes: Language version updates or deprecated syntax
- Output Mismatches: Function behavior changes or updates
- Deprecated Functions: Using removed or phased-out APIs
Testing Examples
# Example validation for various languages
npm run docs:test-examples # JavaScript/TypeScript
python -m doctest docs/ # Python
cargo test --doc # Rust
go test -run=Doc # Go#!/usr/bin/env python3
"""Audit Markdown code fences for obvious drift indicators."""
from __future__ import annotations
import argparse
import re
from pathlib import Path
FENCE_RE = re.compile(r"```(?P<lang>[^\n`]*)\n(?P<body>.*?)```", re.DOTALL)
PLACEHOLDERS = ("TODO", "your-api-key", "example.com", "lorem ipsum")
def inspect_file(path: Path) -> list[str]:
text = path.read_text(encoding="utf-8", errors="replace")
findings: list[str] = []
for index, match in enumerate(FENCE_RE.finditer(text), start=1):
lang = match.group("lang").strip()
body = match.group("body")
if not lang:
findings.append(f"{path}: code fence #{index} has no language tag")
for token in PLACEHOLDERS:
if token.lower() in body.lower():
findings.append(f"{path}: code fence #{index} contains placeholder '{token}'")
break
return findings
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("paths", nargs="+", help="Markdown files or directories")
args = parser.parse_args()
findings: list[str] = []
for raw in args.paths:
path = Path(raw)
files = [path] if path.is_file() else sorted(path.rglob("*.md"))
for file_path in files:
findings.extend(inspect_file(file_path))
if findings:
print("\n".join(findings))
return 1
print("No obvious code example drift markers found.")
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
FAQ
What does code-examples-sync do?
code-examples-sync is a Claude Code skill for ai & agent building. It helps developers move faster with AI-assisted development.
When should I use code-examples-sync?
When you need to helps with ai & agent building tasks, or when code-examples-sync is a claude code skill for ai & agent building. it helps developers move faster with ai-assisted development.
What are the main capabilities?
code-examples-sync; AI & Agent Building; AI-coding skill.