Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 42b75ca

Browse files
roottoolclaude
andauthored
feat: add boundary-validator skill for automated code review (#48)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 69652b3 commit 42b75ca

11 files changed

Lines changed: 2653 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,76 @@ If a change makes the parser:
242242
it likely violates the boundary.
243243

244244
When in doubt, reject the change.
245+
246+
---
247+
248+
## Agent Skills
249+
250+
This project provides the content of AGENTS.md in Agent Skills format through the `skills/` directory.
251+
252+
### Purpose
253+
254+
Agent Skills are structured knowledge packages optimized for Claude Code and similar AI-powered development tools. They enable:
255+
256+
- **Automatic triggering**: Skills activate during PR creation, code review, etc.
257+
- **Progressive disclosure**: Load only necessary information on demand
258+
- **Standardized format**: Follows [agentskills.dev](https://agentskills.dev) specification
259+
260+
### Available Skills
261+
262+
#### boundary-validator (`skills/boundary-validator/`)
263+
264+
Validates code changes against the Design rules and Security rules defined in this document.
265+
266+
- **Purpose**: Automated detection of boundary principle violations
267+
- **Triggers**: PR creation, code review, post-implementation checks
268+
- **Coverage**:
269+
- Keys are opaque strings (no bracket/dot notation parsing)
270+
- No silent behavior (detect duplicate keys)
271+
- No inference, no convenience (no type coercion, validation)
272+
- Explicit issue reporting (no exceptions for input errors)
273+
- Security rules (forbidden keys, prototype safety)
274+
275+
**Supported tools**: Claude Code
276+
277+
For details, see [`skills/boundary-validator/SKILL.md`](skills/boundary-validator/SKILL.md).
278+
279+
### Using Skills in Other Tools
280+
281+
Agent Skills are currently supported primarily by Claude Code. For other development tools:
282+
283+
| Tool | Support | Usage |
284+
| ----------------- | --------- | -------------------------------------------- |
285+
| **Claude Code** | ✅ Full | Automatic detection of `skills/` directory |
286+
| **Windsurf** | ⚠️ Manual | Reference this AGENTS.md directly in prompts |
287+
| **Cursor** | ⚠️ Manual | Use `.cursorrules` or reference AGENTS.md |
288+
| **claude.ai Web** | ⚠️ Manual | Upload SKILL.md as project knowledge |
289+
290+
**For non-supported tools**: Use this AGENTS.md document directly, or configure your tool to reference the project's design principles explicitly in CLAUDE.md.
291+
292+
### Relationship to AGENTS.md
293+
294+
- **AGENTS.md is the source of truth**: All design principle changes are made here first
295+
- **Skills are optimized versions**: The `skills/` directory provides the same rules in a format optimized for agent consumption
296+
- **Synchronization**: When AGENTS.md is updated, corresponding files in `skills/boundary-validator/references/` should be updated
297+
298+
This is a **strategic duplication**:
299+
300+
- **AGENTS.md**: Human-readable, comprehensive, works with all tools
301+
- **skills/**: Agent-optimized, progressive disclosure, auto-triggering (Claude Code)
302+
303+
Both serve different audiences and purposes, making the duplication necessary for maximum compatibility.
304+
305+
### Maintenance
306+
307+
When updating design rules:
308+
309+
1. **Edit AGENTS.md first** (this file is the master)
310+
2. **Update corresponding references** in `skills/boundary-validator/references/`
311+
- `design-rules.md` - Lines 36-75 of this file
312+
- `security-rules.md` - Lines 76-95 of this file
313+
- `api-contract.md` - Lines 119-199 of this file
314+
3. **Increment skill version** in `skills/boundary-validator/SKILL.md` frontmatter
315+
4. **Commit both** AGENTS.md and skills/ changes together
316+
317+
For more information about the skills system, see [`skills/README.md`](skills/README.md).

CLAUDE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,42 @@ When implementing features or reviewing code:
2222
2. Then, apply AGENTS.md technical constraints
2323
3. If a change makes the parser smarter/more convenient, it likely violates the boundary → reject it
2424

25+
## Project Skills
26+
27+
This project includes **Agent Skills** in the `skills/` directory, providing automated code review capabilities for Claude Code.
28+
29+
### boundary-validator
30+
31+
The `boundary-validator` skill automatically validates code changes against AGENTS.md design rules:
32+
33+
- **Location**: `skills/boundary-validator/`
34+
- **Purpose**: Detect boundary principle violations during PR creation and code review
35+
- **Triggers**: Automatically activates when creating PRs or requesting code reviews
36+
- **Coverage**:
37+
- Keys are opaque strings (no bracket/dot notation parsing)
38+
- No silent behavior (detect duplicate keys)
39+
- No inference, no convenience (no type coercion, validation)
40+
- Explicit issue reporting (no exceptions for input errors)
41+
- Security rules (forbidden keys, prototype safety)
42+
43+
**Usage in Claude Code**:
44+
45+
```
46+
Review this code against boundary-validator rules
47+
```
48+
49+
The skill will automatically check your implementation for violations and provide specific feedback with line references.
50+
51+
### For Non-Claude Code Tools
52+
53+
If you're using other development tools (Windsurf, Cursor, etc.):
54+
55+
- **Reference AGENTS.md directly** in your prompts or tool configuration
56+
- Agent Skills are primarily designed for Claude Code
57+
- See `skills/README.md` for more details on cross-tool compatibility
58+
59+
For complete information about the skills system, see [`skills/README.md`](skills/README.md) and [`AGENTS.md`](AGENTS.md#agent-skills).
60+
2561
## API Documentation
2662

2763
For complete API documentation, TypeScript interfaces, and usage examples, see **README.md**.

skills/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# safe-formdata Agent Skills
2+
3+
This directory contains **Agent Skills** specific to the safe-formdata project.
4+
5+
## What are Agent Skills?
6+
7+
Agent Skills are structured knowledge packages that agents like Claude Code can efficiently reference. Based on the implementation rules in AGENTS.md, they provide:
8+
9+
- **Automatic triggering**: Activates automatically during PR creation and code review
10+
- **Progressive disclosure**: Loads only necessary information incrementally
11+
- **Standardized format**: Complies with the [agentskills.dev](https://agentskills.dev) official specification
12+
13+
## Available Skills
14+
15+
### boundary-validator
16+
17+
Performs code review based on boundary principles.
18+
19+
- **Purpose**: Automatically detect violations of safe-formdata's design principles
20+
- **Triggers**: PR creation, code review, post-implementation
21+
- **Validation items**:
22+
- Key opacity (no array notation parsing, etc.)
23+
- No silent behavior (no merging, overwriting, etc.)
24+
- No inference or convenience features
25+
- Explicit error reporting
26+
27+
For details, see [`boundary-validator/SKILL.md`](./boundary-validator/SKILL.md).
28+
29+
## Supported Tools
30+
31+
### ✅ Automatic Support
32+
33+
- **Claude Code** - Automatically detects `skills/` in the project
34+
35+
### ⚠️ Manual Reference Required
36+
37+
- **Windsurf** - Instruct to reference AGENTS.md directly
38+
- **Cursor** - Specify rules in AGENTS.md or `.cursorrules`
39+
- **claude.ai Web** - Manually upload as project knowledge
40+
41+
## Relationship to AGENTS.md
42+
43+
- **AGENTS.md**: Master document for both humans and agents
44+
- **skills/**: Optimized version for Agent Skills-compatible tools
45+
46+
If you're using tools that don't support Agent Skills, please reference [AGENTS.md](../AGENTS.md) directly.
47+
48+
## Maintenance Policy
49+
50+
1. **AGENTS.md is the source of truth**: Make design principle changes in AGENTS.md first
51+
2. **Skills follow**: Reflect AGENTS.md changes in `skills/`
52+
3. **Strategic duplication**: Document duplication is acceptable due to different purposes
53+
54+
## Official Specification
55+
56+
The Skills in this directory comply with the [agentskills.dev](https://agentskills.dev) official specification.
57+
58+
Validation tool:
59+
60+
```bash
61+
skills-ref validate ./boundary-validator
62+
```
63+
64+
## License
65+
66+
The same license as the safe-formdata project applies. See `LICENSE.txt` in each skill.
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) 2025 roottool
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)