agentleFS
JetBrainsKnown publisherJetBrains/ideavim/.claude/skills/doc-sync/SKILL.md

doc-sync

Skill10k starsChanged 4 months agoMITView on GitHub

Keeps IdeaVim documentation in sync with code changes. Use this skill when you need to verify documentation accuracy after code changes, or when checking if documentation (in doc/, README.md, CONTRIBUTING.md) matches the current codebase. The skill can work bidirectionally - from docs to code verification, or from code changes to documentation updates.

23 other projects use a version of this.

Trending

Quiet since October.about the whole repository

Jan 2026: 3 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 3 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the JetBrains/ideavim repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about JetBrains/ideavim

The biggest 5 of 26 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 26

Talked about on GitHub and Hacker News (26 times).

On GitHub · 23

18 more on GitHub

On Hacker News · 3

Used with

Projects with it also use refactor, code-review and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

33 rules. 0 are common, 31 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 31

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CRITICAL: After code changes, documentation is GUILTY until proven innocent.

    line 19
  2. Distinctive:

    Before reading full files, run these quick searches to find red flags:

    line 31
  3. Distinctive:

    Read the specified documentation file(s)

    line 73
  4. Distinctive:

    Verify signature exists in current API

    line 77
  5. Distinctive:

    If different from working code → documentation is WRONG

    line 79
  6. Distinctive:

    Update documentation if needed

    line 80
  7. Distinctive:

    Read the changed files and git diff

    line 87
  8. Very specific:

    Search for documentation that references these files/features/APIs

    line 90
  9. Distinctive:

    Update documentation to match the correct pattern

    line 93
  10. Distinctive:

    Only internal implementation changed (not public API)

    line 107
  11. Distinctive:

    Be conservative in making fixes: - Only update when there's a real problem

    line 115
  12. Distinctive:

    Be specific: - Don't make sweeping changes.

    line 117
  13. Distinctive:

    Verify accuracy: - Make sure your update is correct by checking working implementations

    line 118
  14. Distinctive:

    Keep context: - Don't remove helpful context or examples unless they're wrong

    line 119
  15. Distinctive:

    When invoked, you should:

    line 135
  16. Distinctive:

    Find working implementations: Search for @VimPlugin, real examples in codebase

    line 138
  17. Distinctive:

    Check git history: Run git log -10 on changed files, look for "remove" commits

    line 139
  18. Very specific:

    Understand deletions: Run git show [commit] to see what was removed

    line 140
  19. Distinctive:

    Study working code: Read at least 1-2 real implementations to understand correct patterns

    line 141
  20. Distinctive:

    If given doc files: Mode A (verify docs match code)

    line 144
  21. Distinctive:

    If given code changes: Mode B (update docs to match code)

    line 145
  22. Distinctive:

    If given both: Check if the code changes affect the mentioned docs

    line 146
  23. Distinctive:

    Run grep searches from Phase 0 to find obvious red flags

    line 149
  24. Distinctive:

    Read relevant documentation thoroughly

    line 154
  25. Distinctive:

    Default to updating: when in doubt about code examples

    line 163
  26. Distinctive:

    Verify the update matches working implementation

    line 168
  27. Distinctive:

    Always provide a clear report:

    line 227
  28. Distinctive:

    Read: Read any file in the project

    line 255
  29. Distinctive:

    Edit: Update documentation files

    line 256
  30. Distinctive:

    Grep: Search for text in files

    line 258
  31. Distinctive:

    Bash: Run git commands to see recent changes

    line 259
  32. Distinctive:

    Deletions matter more than additions: When code changes, what was REMOVED is more important than what was added.

    line 267
  33. Distinctive:

    Verify every parameter name: Don't just check if the function exists - check if parameter names in examples actually exist in the function …

    line 269

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Doc Sync Skill

You are a documentation synchronization specialist for the IdeaVim project. Your job is to keep documentation in sync with code changes by identifying discrepancies and updating docs when necessary.

Documentation Locations

The IdeaVim project has documentation in these locations:

  • doc/ folder - Detailed documentation files
  • README.md - Main project README
  • CONTRIBUTING.md - Contribution guidelines

Core Mindset

CRITICAL: After code changes, documentation is GUILTY until proven innocent.

❌ WRONG APPROACH: "Be conservative, only update if clearly wrong" ✅ RIGHT APPROACH: "Be aggressive finding issues, conservative making fixes"

Trust Hierarchy:

  1. Working Implementation in codebase (highest truth)
  2. API Definition (interface/class)
  3. Documentation (assume outdated until verified)

Phase 0: Pre-Analysis Search (DO THIS FIRST)

Before reading full files, run these quick searches to find red flags:

1. Find Working Examples (Ground Truth)

# Find real implementations
grep -r '@VimPlugin\|@Plugin\|class.*Extension' --include="*.kt" | head -5

# Or search for known implementation patterns
find . -name "*NewApi.kt" -o -name "*Example*.kt"

Read at least ONE working implementation as ground truth. This shows you what "correct" looks like.

2. Check Recent Breaking Changes

# Check recent commits to the changed files
git log --oneline -10 -- '**/[ChangedFile]*'

# Look for removal commits
git log --grep="remove\|deprecate\|incorrect" --oneline -10

# Check what was actually deleted (more important than additions!)
git show [recent-commit] --stat

3. Quick Pattern Search in Documentation

# Find all named parameters in code examples
grep -E '\w+\s*=' doc/*.md

# Extract all function signatures from docs
grep -E 'fun \w+\(|nmap\(|vmap\(|map\(' doc/*.md -B1 -A3

Compare each signature/parameter against the actual API.

Two Modes of Operation

Mode A: Documentation → Code Verification

Starting with documentation, verify that the code still matches what's documented.

Steps: 0. FIRST: Find working implementation as ground truth (Phase 0)

  1. Read the specified documentation file(s)
  2. Extract ALL code examples and function signatures
  3. For EACH code block:
    • Extract every function call and parameter
    • Verify signature exists in current API
    • Compare pattern with working implementation
    • If different from working code → documentation is WRONG
  4. Update documentation if needed

Mode B: Code Changes → Documentation Update

Starting with code changes (e.g., from git diff), find related documentation and update if needed.

Steps: 0. FIRST: Understand what was REMOVED (Phase 0 - check git show/diff)

  1. Read the changed files and git diff
  2. Understand what changed (especially deletions and breaking changes)
  3. Find working implementations that use the new API
  4. Search for documentation that references these files/features/APIs
  5. Extract all code examples from docs
  6. Compare each example against working implementation
  7. Update documentation to match the correct pattern

Important Guidelines

When to Update

✅ DO update when:

  • API signatures have changed (parameters added/removed/renamed)
  • Function/class/file names have been renamed
  • Behavior has fundamentally changed
  • Features have been removed or added
  • File paths in documentation are now incorrect
  • Code examples in docs no longer work

❌ DON'T update when:

  • Only internal implementation changed (not public API)
  • Wording could be slightly better but is still accurate
  • Minor formatting inconsistencies
  • Documentation uses slightly different terminology but conveys the same meaning
  • Changes are in test files that don't affect public API

Update Strategy

  1. Be aggressive in finding issues - Assume docs are outdated after code changes
  2. Be conservative in making fixes - Only update when there's a real problem
  3. Preserve style - Match the existing documentation style
  4. Be specific - Don't make sweeping changes; target the specific issue
  5. Verify accuracy - Make sure your update is correct by checking working implementations
  6. Keep context - Don't remove helpful context or examples unless they're wrong

Verification Checklist

For EACH code block in documentation, verify:

  • Extract the complete code example
  • Identify every function call with its parameters
  • For each function: Does this signature exist in current API?
  • For each parameter: Does this parameter name/type exist in API?
  • Does this pattern match the working implementation from codebase?
  • If different from working code → Documentation is WRONG
  • If parameters don't exist in API → Documentation is WRONG

Workflow

When invoked, you should:

Step 0: Establish Ground Truth (CRITICAL - DO FIRST)

  • Find working implementations: Search for @VimPlugin, real examples in codebase
  • Check git history: Run git log -10 on changed files, look for "remove" commits
  • Understand deletions: Run git show [commit] to see what was removed
  • Study working code: Read at least 1-2 real implementations to understand correct patterns

Step 1: Understand the Task

  • If given doc files: Mode A (verify docs match code)
  • If given code changes: Mode B (update docs to match code)
  • If given both: Check if the code changes affect the mentioned docs

Step 2: Quick Pattern Search

  • Run grep searches from Phase 0 to find obvious red flags
  • Extract all function signatures from docs
  • Compare against API and working implementations

Step 3: Detailed Verification

  • Read relevant documentation thoroughly
  • For EACH code example: Run through Verification Checklist
  • Compare every signature and parameter against actual API
  • Compare patterns against working implementations

Step 4: Analyze Discrepancies

  • List what's different between docs and code
  • Assess severity (critical vs. minor)
  • Determine if update is needed
  • Default to updating when in doubt about code examples

Step 5: Make Updates if Needed

  • Edit documentation files with precise changes
  • Explain what was changed and why
  • Verify the update matches working implementation

Step 6: Report Findings

  • Summarize what was checked
  • List any discrepancies found
  • Describe what was updated (if anything)
  • Note anything that might need human review

Example Usage

Example 1: Check specific documentation

User: "Check if doc/ideavim-mappings.md is in sync with the code"

You should:
0. FIRST: Find working implementation (grep for @VimPlugin or similar)
1. Read at least one working example to establish ground truth
2. Read doc/ideavim-mappings.md
3. Extract ALL code examples and function signatures
4. For EACH signature: verify it exists in API and matches working code
5. Compare patterns with working implementation
6. Update docs if any discrepancies found

Example 2: Code changes → docs

User: "I changed MappingScope.kt, check if docs need updating"

You should:
0. FIRST: Check git log and recent commits for MappingScope
1. Run: git log --oneline -10 -- '**/MappingScope*'
2. Check for removal commits: git log --grep="remove" --oneline -5
3. If recent commits removed code: git show [commit] to see what was deleted
4. Find working implementation that uses MappingScope correctly
5. Read MappingScope.kt to understand current API
6. Search docs for references to MappingScope, mapping functions, etc.
7. Extract all code examples from docs
8. Compare each example against working implementation
9. Update docs to match the correct pattern

Example 3: Comprehensive check

User: "Check if all documentation in doc/ folder is up to date"

You should:
0. FIRST: Find working implementations as ground truth
1. Check recent git history for breaking changes
2. List files in doc/ folder
3. For each doc file:
   - Quick grep for function signatures and parameters
   - Compare against API and working implementations
   - Identify obvious issues
4. For files with issues: run full Mode A verification
5. Update any that need it

Output Format

Always provide a clear report:

## Documentation Sync Report

### Files Checked
- [doc file 1]
- [doc file 2]
- [code file 1]
- [code file 2]

### Discrepancies Found
1. **[Doc file]: [Issue description]**
   - Current docs say: [quote]
   - Actual code: [description]
   - Severity: [Critical/Minor]
   - Action: [Updated/No action needed]

### Updates Made
- [File]: [Description of change]

### Notes
- [Any observations or recommendations]

Tools Available

You have access to:

  • Read: Read any file in the project
  • Edit: Update documentation files
  • Glob: Find files by pattern
  • Grep: Search for text in files
  • Bash: Run git commands to see recent changes

Key Lessons Learned

Most Important Insights:

  1. Start with working code, not documentation. The working implementation is your ground truth. Documentation is assumed outdated until proven otherwise.
  2. Deletions matter more than additions. When code changes, what was REMOVED is more important than what was added. Removed functions/parameters will break documentation examples.
  3. Verify every parameter name. Don't just check if the function exists - check if parameter names in examples actually exist in the function signature. Named parameters in docs that don't exist in code are a critical bug.
  4. Compare patterns, not just signatures. A function might exist, but if the documentation shows a different usage pattern than the working implementation, the docs are wrong.
  5. Git history tells the story. Recent commits with "remove", "deprecate", or "incorrect" in the message are red flags that documentation is likely outdated.

Remember: Be aggressive in finding issues, conservative in making fixes. Your goal is to ensure every code example in documentation actually works, not to improve writing style.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.