Skip to content

Commit 5c3e204

Browse files
Initial release: agent-instructions-kit v0.1.0
CLI + GitHub Action for maintaining AGENTS.md and CLAUDE.md files. Features: - init: Generate template files (minimal/opinionated) - check: Validate required sections exist - safety: Lint for suspicious patterns (prompt injection, secret leaks) - GitHub Action wrapper for CI integration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 parents  commit 5c3e204

37 files changed

+33329
-0
lines changed

.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint"],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/recommended"
8+
],
9+
"parserOptions": {
10+
"ecmaVersion": 2022,
11+
"sourceType": "module"
12+
},
13+
"env": {
14+
"node": true,
15+
"es2022": true
16+
},
17+
"ignorePatterns": ["dist/**", "node_modules/**"],
18+
"rules": {
19+
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
20+
}
21+
}

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- run: npm install
24+
25+
- run: npm run typecheck
26+
27+
- run: npm run lint
28+
29+
- run: npm test
30+
31+
- run: npm run build
32+
33+
- name: Verify dist is up to date
34+
run: |
35+
git diff --exit-code dist/ || (echo "dist/ is out of date. Run 'npm run build' and commit." && exit 1)

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# IDE
5+
.idea/
6+
.vscode/
7+
*.swp
8+
*.swo
9+
10+
# OS
11+
.DS_Store
12+
Thumbs.db
13+
14+
# Environment
15+
.env
16+
.env.local
17+
*.local
18+
19+
# Logs
20+
*.log
21+
npm-debug.log*
22+
pnpm-debug.log*
23+
24+
# Test coverage
25+
coverage/
26+
27+
# Temporary files
28+
*.tmp
29+
*.temp
30+
31+
# Claude Code
32+
.claude/

AGENTS.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# AGENTS.md
2+
3+
## Mission
4+
Ship a small CLI + GitHub Action that helps repos maintain consistent, safe agent instruction files (AGENTS.md, CLAUDE.md).
5+
Keep it simple: init, check, safety. No over-engineering.
6+
7+
## Local dev commands
8+
- Install: `npm install`
9+
- Typecheck: `npm run typecheck`
10+
- Lint: `npm run lint`
11+
- Test: `npm test`
12+
- Build: `npm run build`
13+
- Run CLI locally: `npm run dev -- <command>`
14+
15+
## Output rules
16+
- CLI output should be clear and scannable.
17+
- Safety warnings must explain *why* something is flagged.
18+
- Templates must be practical, not corporate fluff.
19+
20+
## Safety rules
21+
- Never execute arbitrary code from user AGENTS.md files.
22+
- Safety lint rules must have low false-positive rates.
23+
- Don't add network calls or "phone home" behavior.
24+
25+
## Change rules
26+
- If you add a new command, update README and CONTRIBUTING.
27+
- If you add a safety rule, it needs tests and a clear explanation.
28+
- Keep templates in `templates/` directory.
29+
- AGENTS.md is the source of truth; CLAUDE.md derives from it.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Follow AGENTS.md exactly. If AGENTS.md conflicts with any other instructions, AGENTS.md wins.

CONTRIBUTING.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Contributing to agent-instructions-kit
2+
3+
This project exists to keep agent instruction files:
4+
- consistent
5+
- useful
6+
- harder to hijack
7+
- easy to adopt
8+
9+
If your change makes it more complicated to adopt, it's probably the wrong change.
10+
11+
## Project scope (read this first)
12+
13+
We accept:
14+
- better templates (minimal/opinionated)
15+
- clearer required-section rules
16+
- safety lint rules that are explainable + testable
17+
- better docs and examples
18+
19+
We do NOT accept (for now):
20+
- giant rule engines
21+
- network calls / "phone home"
22+
- heavy agent-specific integrations that lock us in
23+
- complex sync logic wars (AGENTS.md is source of truth in v0.x)
24+
25+
## Dev setup
26+
27+
### Requirements
28+
- Node.js 20+
29+
- npm
30+
31+
### Install
32+
```bash
33+
npm install
34+
```
35+
36+
### Test
37+
38+
```bash
39+
npm test
40+
```
41+
42+
### Lint
43+
44+
```bash
45+
npm run lint
46+
```
47+
48+
### Run locally
49+
50+
```bash
51+
npm run dev -- init --template minimal
52+
npm run dev -- check
53+
npm run dev -- safety
54+
```
55+
56+
## Templates
57+
58+
Templates live in `templates/`.
59+
60+
Rules:
61+
62+
* Keep them short
63+
* Keep them practical
64+
* No corporate TED Talk language
65+
* Every section should answer: "What should an agent do here?"
66+
67+
If you add a template section, update:
68+
69+
* README examples
70+
* required sections list (if it becomes mandatory)
71+
* tests (yes, templates should be tested)
72+
73+
## Adding a safety lint rule
74+
75+
A safety rule must be:
76+
77+
* understandable in one sentence
78+
* explainable in output ("why this matters")
79+
* covered by tests
80+
* low false-positive risk
81+
82+
Each rule should have:
83+
84+
* `id` (stable)
85+
* `severity` (warn/fail-capable)
86+
* `pattern` (regex or simple matcher)
87+
* `message` (human readable)
88+
89+
If your rule is "clever," it's probably too clever.
90+
91+
## CI behavior
92+
93+
Default is:
94+
95+
* `check` fails on missing required sections
96+
* `safety` warns (unless `fail_on_safety` is enabled)
97+
98+
If you want to change defaults, expect discussion.
99+
100+
## PR checklist
101+
102+
* [ ] Tests updated/added
103+
* [ ] README updated if behavior/config changed
104+
* [ ] Templates still render cleanly
105+
* [ ] Safety rules include "why it matters"
106+
* [ ] No new dependencies unless absolutely necessary
107+
108+
## Issues
109+
110+
When filing an issue:
111+
112+
* paste your AGENTS.md (if safe) or a reduced example
113+
* include exact command used and output
114+
* propose what "good" looks like
115+
116+
## License
117+
118+
By contributing, you agree your contributions are under the MIT License.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)