Back to Skills

update-docs

verified

Use when updating documentation related to recent code changes. Finds related docs, updates CHANGELOG, and delegates simple fixes to haiku.

View on GitHub

Marketplace

awesome-slash

avifenesh/awesome-slash

Plugin

next-task

productivity

Repository

avifenesh/awesome-slash
290stars

plugins/next-task/skills/docs-update/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/next-task/skills/docs-update/SKILL.md -a claude-code --skill update-docs

Installation paths:

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

Instructions

# update-docs

Update documentation related to files modified in current workflow.

## Architecture

**Sonnet discovers, Haiku executes:**
- This skill (sonnet): Find related docs, analyze issues, create fix list
- simple-fixer (haiku): Execute mechanical updates

## Workflow

### Phase 1: Get Context

```javascript
const { getPluginRoot } = require('./lib/cross-platform');
const path = require('path');
const pluginRoot = getPluginRoot('next-task');
const workflowState = require(path.join(pluginRoot, 'lib/state/workflow-state.js'));

const state = workflowState.readState();
const task = state.task;

// Get changed files
const changedFiles = await exec('git diff --name-only origin/main..HEAD');
```

### Phase 2: Find Related Documentation

```javascript
async function findRelatedDocs(changedFiles) {
  const relatedDocs = [];

  for (const file of changedFiles) {
    const basename = file.split('/').pop().replace(/\.[^.]+$/, '');
    const moduleName = file.split('/')[1];

    const docFiles = await glob('**/*.md');
    for (const docFile of docFiles) {
      const content = await readFile(docFile);
      if (content.includes(basename) || content.includes(moduleName)) {
        relatedDocs.push({ docFile, referencedFile: file });
      }
    }
  }
  return relatedDocs;
}
```

### Phase 3: Analyze Documentation Issues

```javascript
async function analyzeDoc(docFile, changedFiles) {
  const content = await readFile(docFile);
  const issues = [];

  // Check for outdated imports
  const importMatches = content.match(/import .* from ['"]([^'"]+)['"]/g);
  // ... validate each import path exists

  // Check for outdated function references
  for (const file of changedFiles) {
    const removedExports = await getRemovedExports(file);
    for (const removed of removedExports) {
      if (content.includes(removed)) {
        issues.push({ type: 'removed-export', reference: removed });
      }
    }
  }

  return issues;
}
```

### Phase 4: Update CHANGELOG

```javascript
asy

Validation Details

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

Issues Found:

  • name_directory_mismatch