Back to skills
SKILL.md
Action Validator
ASecurityPre-action boundary checking — validates agent tool calls against declared capabilities and task contracts
- 43 stars
- 0 votes
- 0 copies
- 1 view
- Added September 9, 2026
Security analysis
100/100npx -y skills add baekenough/oh-my-customcode --skill action-validator --agent claude-codeAre you the author of Action Validator?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/baekenough-action-validator)---
name: action-validator
description: Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts
scope: core
user-invocable: false
---
# Action Validator Skill
## Purpose
Advisory pre-action validation layer that checks agent tool calls against declared capabilities, file access scope (R002), and task contracts before execution. Inspired by AutoHarness (Google DeepMind) — enforcing action-space legality at agent boundaries.
This skill does NOT block actions (R021 advisory-first model). It emits warnings when agents attempt operations outside their declared scope.
## Validation Checks
| Check | What | Against |
|-------|------|---------|
| Tool scope | Tool being called | Agent's `tools` frontmatter list |
| File scope | File path in Write/Edit | R002 file access rules |
| Domain scope | Target file extension | Agent's `domain` frontmatter |
| Task contract | Operation type | Task description constraints |
## Advisory Format
```
--- [Action Validator] Scope warning ---
Agent: {agent-name}
Tool: {tool-name}
Target: {file-path}
Issue: {description}
Declared scope: {agent's declared tools/domain}
💡 Suggestion: {recommended action}
---
```
## Integration Points
| System | How |
|--------|-----|
| PreToolUse hooks | Optional hook to check tool calls (advisory only) |
| pipeline-guards | Complements pipeline stage gates |
| adversarial-review | Provides action-space-legality criterion |
| R002 (Permissions) | Validates against declared file access rules |
| R010 (Orchestrator) | Orchestrator validates subagent scope claims |
## Policy Cache Pattern
For high-repetition agents (e.g., mgr-gitnerd commit workflows), capture validated decision paths as reusable policies:
```yaml
policy_cache:
agent: mgr-gitnerd
action: git-commit
validated_steps:
- tool: Bash
pattern: "git add *"
verdict: allow
hints: { safety: normal, parallel: false, approval: auto }
- tool: Bash
pattern: "git commit *"
verdict: allow
hints: { safety: normal, parallel: false, approval: auto }
- tool: Bash
pattern: "git push *"
verdict: warn_confirm
hints: { safety: low, parallel: false, approval: needs_approval }
```
Policy caching reduces redundant LLM calls for well-understood workflows. Policies are advisory — the orchestrator may override.
## Capability Hints (Opus 4.8+)
When agents target Opus 4.8 (`opus48` model alias), tool capability hints improve batched tool-call planning. Declare per-tool metadata in policy cache entries:
| Field | Values | Effect |
|-------|--------|--------|
| `safety` | `normal`, `low` | `low` triggers confirmation advisory |
| `parallel` | `true`, `false` | `true` allows concurrent scheduling |
| `approval` | `auto`, `needs_approval` | Maps to R002 permission tier |
### Example: Enhanced Policy Cache with Capability Hints
```yaml
policy_cache:
agent: mgr-gitnerd
action: git-commit
validated_steps:
- tool: Bash
pattern: "git add *"
verdict: allow
hints: { safety: normal, parallel: false, approval: auto }
- tool: Bash
pattern: "git push *"
verdict: warn_confirm
hints: { safety: low, parallel: false, approval: needs_approval }
- tool: Read
pattern: "*"
verdict: allow
hints: { safety: normal, parallel: true, approval: auto }
```
Hints are advisory — they inform model scheduling but do not enforce. Inspired by [ouroboros PR #353](https://github.com/Q00/ouroboros/pull/353) capability graph pattern.
## Code Harness Integration (AutoHarness)
When a synthesized harness exists for an agent (`.claude/outputs/harnesses/{agent-name}-*.yaml`), action-validator can use it for enhanced validation:
### Tool: Writing artifacts under .claude/outputs/
Under `mode: "bypassPermissions"`, direct Write/Edit/Bash on `.claude/**` paths is permitted (CC v2.1.121+, #1101) — no `/tmp/*.sh` wrapping is needed.
To write action-validator results under `.claude/outputs/sessions/`:
1. Write the artifact body directly to `.claude/outputs/sessions/$(date +%Y-%m-%d)/action-validator-$(date +%H%M%S).md` with the Write tool (every Agent tool call includes `mode: "bypassPermissions"`, R010)
2. Read-only Bash on `.claude/outputs/` (e.g., `cat`, `head`, `wc`) is allowed for verification
Reference: R006/R010 sensitive-path handling (CC v2.1.121+), #1101.
| Mode | Source | Behavior |
|------|--------|----------|
| Advisory (default) | Prompt-based checks | Emit warnings only |
| Code-verified | harness-synthesizer output | Run harness validation code, emit advisory results |
| Hard-enforce (opt-in) | harness-synthesizer `--hard-enforce` | Block invalid actions (requires explicit opt-in, see R021) |
To generate a harness for an agent: `/harness-synthesizer --agent {name} --mode verifier`
Code harness validation is additive — it supplements prompt-based checks, not replaces them.
## Scope
This skill is an advisory layer, not a hard enforcement mechanism:
- **Does**: Emit warnings, log scope violations, suggest corrections
- **Does NOT**: Block tool execution, modify agent behavior, override R021
- **Future**: May integrate with PreToolUse hooks for automated checking (see R021 promotion criteria)
## Related Guide
- `guides/harness-engineering/` — 하네스 엔지니어링 통합 가이드 (Behavior Control Layer 관점에서 action-validator 위치)
Attribution
Comments
Loading comments…