Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

sync-docs-discovery

verified

Use when finding docs affected by code changes. Find documentation files related to changed source files using lib/collectors/docs-patterns.

View on GitHub

Marketplace

awesome-slash

avifenesh/awesome-slash

Plugin

sync-docs

development

Repository

avifenesh/awesome-slash
322stars

plugins/sync-docs/skills/sync-docs-discovery/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/avifenesh/awesome-slash/blob/main/plugins/sync-docs/skills/sync-docs-discovery/SKILL.md -a claude-code --skill sync-docs-discovery

Installation paths:

Claude
.claude/skills/sync-docs-discovery/
Powered by add-skill CLI

Instructions

# sync-docs-discovery

Find documentation related to changed source files.

## Input

Arguments: `<changed-files-json>`

- **changed-files-json**: JSON array of file paths that changed

## Discovery Logic

Uses the shared collectors infrastructure:

```javascript
const { collectors } = require('@awesome-slash/lib');

const result = collectors.docsPatterns.findRelatedDocs(changedFiles, {
  cwd: process.cwd()
});
```

## Reference Types

The discovery process checks for these reference types:

| Type | Pattern | Example |
|------|---------|---------|
| `filename` | Base filename in content | "utils.js" in README |
| `full-path` | Complete path | "src/utils.js" |
| `import` | ES import statement | `from './utils'` |
| `require` | CommonJS require | `require('./utils')` |
| `url-path` | URL path reference | `/api/utils` |

## Output Format

```json
{
  "changedFiles": ["src/utils.js", "lib/api.js"],
  "relatedDocs": [
    {
      "doc": "README.md",
      "referencedFile": "src/utils.js",
      "referenceTypes": ["filename", "import"]
    },
    {
      "doc": "docs/API.md",
      "referencedFile": "lib/api.js",
      "referenceTypes": ["full-path", "url-path"]
    }
  ],
  "markdownFiles": [
    "README.md",
    "CHANGELOG.md",
    "docs/API.md",
    "docs/GUIDE.md"
  ]
}
```

## Performance

- Scans up to 200 markdown files
- Limits directory depth to 5 levels
- Skips node_modules, dist, build, .git

## Usage in Workflow

Called by docs-analyzer agent:

```
Skill: sync-docs-discovery
Args: ["src/utils.js", "lib/api.js"]
```

Returns structured data for the analyzer to process.

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
1502 chars