aimasteracc/tree-sitter-analyzer/tsa-constraints
Claude Code and agent skill by aimasteracc/tree-sitter-analyzer
- community
Checking that the SKILL.md file is still in the repository.
Architectural constraint enforcement. Detect forbidden cross-module calls ("MCP must not depend on CLI") at index time and gate edits on them. Rules live in YAML at repo root; violations bubble up through edit action=safe and edit action=impact as UNSAFE verdicts. Use when: - User asks "does this PR break architecture?" - Pre-merge gate: "any forbidden edges?" - User wants to ADD a new architectural rule - You see a verdict=UNSAFE and want to understand why - Onboarding: "what are the architectural rules of this repo?" Replaces: tribal-knowledge architecture reviews + manual import audits (~5-15k tokens) with 1 MCP call (~200 tokens) + a YAML file (the rules).
Install
npx vskill@latest install aimasteracc/tree-sitter-analyzer/tsa-constraintsSKILL.md
tsa-constraints — Inhibitory edges as code
Bio-analogy: inhibitory synapses — declared "X must NOT call Y" rulesthat fire UNSAFE verdicts when violated. Rules live inarchitectural-constraints.ymlat repo root, are evaluated against thepersisted call graph, and persist violations in SQLite for fast re-reads.
When to use
| Goal | Action | |
|---|---|---|
| List current rules | Read architectural-constraints.yml | |
| Check repo against rules | edit action=constraints (no args) | |
| Pre-edit gate (includes rule check) | edit action=safe (auto) | |
| Add a new rule | Edit YAML + re-run edit action=constraints | |
| Filter violations by severity | edit action=constraints severity_min="error" | |
| Filter by path | edit action=constraints path_filter="mcp/**" |
Procedure
One-shot audit
Returns:
Verdict cascade:
UNSAFE→ any error-severity violationCAUTION→ any warn-severity violationSAFE→ none
Adding a new rule
- Open
architectural-constraints.ymlat repo root - Append:
```yaml
- id: <slug, kebab-case>
severity: error | warn | info rule: forbid from: "path/glob/" to: "path/glob/" reason: "<why this is forbidden>" exceptions: ["specific/file.py"] # optional ```
- Run
edit action=constraintsto see if existing code violates the new rule - Either: fix the violations OR add them to
exceptions
Reading violations
For each violation row:
rule_id— which rule fired (look it up in the YAML forreason)caller_file:caller_line— the offending call sitecallee_file— what it's calling (may be empty if callee unresolved)severity—error= block,warn= surface only,info= noise
DSL semantics
rule: forbid— currently the only supported rule type (MVP)from/to— fnmatch-style globs (**for recursive)exceptions— caller-side globs that bypass the rule- Unknown top-level keys → fatal parse error
- Unknown per-rule keys → warn + skip (forward-compat)
Default rules in THIS repo
Inspect:
Current 3 rules (as of last commit):
mcp-must-not-depend-on-cli— MCP tools are runtime adapters; CLI imports MCP, never reverselanguage-plugins-isolated— language plugins can't know about MCPcore-must-not-import-mcp— core analysis primitives precede MCP layer
CLI equivalents
Exit codes mirror --change-impact:
- 0 → SAFE
- 2 → CAUTION (warn-only)
- 1 → UNSAFE (error severity)
CI gating example:
Anti-patterns
- Don't write a rule per file — use globs (
tree_sitter_analyzer/mcp/**) - Don't set severity=info on rules you actually want enforced (info = visible only)
- Don't forget
reason:— agents reading violations need it to suggest fixes - Don't disable via
--no-constraintsin CI — that defeats the gate's purpose
Decision surface
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtree_sitter_analyzer/skills/tsa-constraints/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aimasteracc/tree-sitter-analyzer/tsa-constraints)