Skip to content
Back to skills

Code To Docs Hooks

ASecurity

Install or remove project-level automation hooks for the code-to-docs lifecycle. Setup adds SessionStart (digest on session start) and PostToolUse (update hint after git commits) hooks. Teardown removes only code-to-docs hooks. Use when someone wants to automate doc updates, set up hooks, or remove hooks.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
documentationbashgitdocumentation

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add SDS-Mode/code-to-docs-skill --skill code-to-docs-hooks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code To Docs Hooks?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code To Docs Hooks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sds-mode-code-to-docs-hooks/badge)](https://www.skillsdirectory.com/skills/sds-mode-code-to-docs-hooks)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hooks
description: >
  Install or remove project-level automation hooks for the code-to-docs lifecycle.
  Setup adds SessionStart (digest on session start) and PostToolUse (update hint
  after git commits) hooks. Teardown removes only code-to-docs hooks.
  Use when someone wants to automate doc updates, set up hooks, or remove hooks.
---

# Hooks

Install or remove project-level hooks that automate the code-to-docs lifecycle. Hooks are written to `.claude/settings.json`. Project-local, read-only, non-destructive.

## Related Skills

| Skill | Purpose |
|-------|---------|
| `code-to-docs` | Full documentation generation |
| `code-to-docs:digest` | What the SessionStart hook triggers |
| `code-to-docs:update` | What the PostToolUse hook reminds about |

## Invocation

```
Skill(skill: "code-to-docs:hooks", args: "setup [vault-path]")
Skill(skill: "code-to-docs:hooks", args: "teardown")
```

## Setup

Run the setup script to install both hooks:

```bash
bash skills/code-to-docs-hooks/hooks/setup.sh [vault-path]
```

This installs two hooks into `.claude/settings.json`:

| Hook | Type | Script | Purpose |
|------|------|--------|---------|
| digest-on-start | SessionStart | `digest-on-start.sh` | Run digest at the start of each session |
| update-hint-on-commit | PostToolUse | `update-hint-on-commit.sh` | Remind to update docs after git commits |

## Teardown

Run the teardown script to remove code-to-docs hooks:

```bash
bash skills/code-to-docs-hooks/hooks/teardown.sh
```

Removes hooks by matching the `source` field. Other hooks in settings.json are left untouched.

## Environment

Set `CODE_TO_DOCS_VAULT` to override the default vault path. This is picked up by both setup and the hook scripts themselves.

## Hook Scripts

| Script | Purpose |
|--------|---------|
| `setup.sh` | Install SessionStart and PostToolUse hooks into `.claude/settings.json` |
| `teardown.sh` | Remove code-to-docs hooks from `.claude/settings.json` by source field |
| `digest-on-start.sh` | SessionStart hook — triggers digest skill on session open |
| `update-hint-on-commit.sh` | PostToolUse hook — prints update reminder after git commit operations |

Files in this skill

  • SKILL.md2.1 KB
  • hooks/digest-on-start.sh2 KB
  • hooks/setup.sh3.2 KB
  • hooks/teardown.sh1.3 KB
  • hooks/update-hint-on-commit.sh872 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.