agentic-guidelines
v1.0.5
Published
CLI to setup shared coding guidelines for Claude Code
Downloads
466
Maintainers
Readme
agentic-guidelines
CLI tool to setup shared coding guidelines for Claude Code across multiple repositories.
What it does
- Downloads shared guidelines from GitHub to
docs/guidelines/ - Configures
.claude/settings.jsonwith a SessionStart hook to auto-load guidelines - Adds a
sync:guidelinesnpm script for future updates
Usage
First-time setup
npx agentic-guidelinesThis will:
- Download guidelines to
docs/guidelines/ - Create/update
.claude/settings.jsonwith the SessionStart hook - Add
sync:guidelinesscript to yourpackage.json(createspackage.jsonif it doesn't exist)
Update guidelines
npm run sync:guidelinesOr:
npx agentic-guidelines --syncOptions
| Option | Description |
|--------|-------------|
| --help, -h | Show help message |
| --sync | Only sync guidelines (skip config updates) |
| --force | Overwrite existing files without prompting |
| --repo <repo> | GitHub repo to pull guidelines from (default: gh:matthewbill/agentic-guidelines/guidelines) |
| --token <token> | GitHub token for private repos |
| --folders <list> | Comma-separated list of folders to download |
Using a custom repo
npx agentic-guidelines --repo gh:myorg/my-guidelines/guidelinesDownloading specific folders
Only download the folders you need:
npx agentic-guidelines --folders ux,testing,languages/reactThis downloads:
guidelines/ux→docs/guidelines/uxguidelines/testing→docs/guidelines/testingguidelines/languages/react→docs/guidelines/languages/react
Private repos
For private repositories, provide a GitHub token:
npx agentic-guidelines --repo gh:myorg/private-repo/guidelines --token ghp_xxxOr set the GITHUB_TOKEN environment variable:
GITHUB_TOKEN=ghp_xxx npx agentic-guidelines --repo gh:myorg/private-repo/guidelinesNote: The --token flag is only used for the initial setup. The generated sync:guidelines script does not include the token - set GITHUB_TOKEN as an environment variable when running sync for private repos.
How it works with Claude Code
When you start a Claude Code session, the SessionStart hook runs:
cat docs/guidelines/guidelines.mdThis injects the guidelines into Claude's context.
License
UNLICENSED - All rights reserved.
