steering-matcher
Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.
- License 许可
- MIT
- 最近更新
- 2026-03-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- steering-matcher
- model
- claude-haiku-4-5
- agents
- [ "orchestrator" ]
- license
- MIT
- metadata
- { "version": "1.0.0", "timelessness": "high" }
- description
- Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.
02 资源文件 1
03 SKILL.md 正文
Steering File Matcher Skill
Triggers
| Trigger Phrase | Operation |
|---|---|
match steering for these files |
get_applicable_steering.ts |
which steering applies to this task |
Pattern match against changed files |
inject steering context |
Return applicable steering sorted by priority |
Purpose
This skill helps orchestrator determine which steering files to inject into agent context based on the files being modified.
- Match file paths against glob patterns in steering file front matter
- Return applicable steering files sorted by priority
- Enable token-efficient context injection (30%+ savings)
When to Use
Use this skill when:
- Orchestrator needs to inject context-aware steering based on files being modified
- You want to scope agent guidance to only relevant files (token optimization)
- Matching file paths against
applyToglob patterns in steering front matter
Use manual file reading instead when:
- You already know which steering file applies
- The task affects a single known steering domain
Quick Usage
Using get_applicable_steering.ts Script
The script in scripts/get_applicable_steering.ts handles pattern matching.
# Match files against steering patterns
bun run ${CLAUDE_SKILL_DIR}/scripts/get_applicable_steering.ts \
--files "src/claude/analyst.md" ".agents/security/TM-001-auth-flow.md" \
--steering-path ".agents/steering"
# Output: JSON array of objects with name, path, apply_to, priority
Process
This skill integrates with the orchestrator workflow:
- Task Analysis: Orchestrator identifies files affected by task
- Pattern Matching: Use this skill to find applicable steering
- Context Injection: Include matched steering in agent prompt
- Token Optimization: Only inject relevant guidance
Standard Orchestrator Workflow
# 1. Identify files from task
# 2. Get applicable steering
bun run ${CLAUDE_SKILL_DIR}/scripts/get_applicable_steering.ts \
--files "src/claude/security.md" ".agents/security/SR-001-oauth-review.md"
# 3. Inject into agent context
# Output: JSON with name, path, apply_to, priority sorted by priority descending
Implementation
See scripts/get_applicable_steering.ts for the TypeScript implementation.
Anti-Patterns
| Avoid | Why | Instead |
|---|---|---|
| Hardcoding steering file paths | Bypasses pattern matching, breaks on restructuring | Use get_applicable_steering.ts |
| Injecting all steering files | Token bloat, irrelevant context | Match against changed files only |
| Ignoring priority ordering | Lower-priority guidance may contradict higher | Process results in priority order |
Verification
After execution:
- [ ] Returned steering files match the
applyTopatterns for the given files - [ ] Results are sorted by priority (highest first)
- [ ] No duplicate steering entries in output
Scripts
get_applicable_steering.ts
Matches file paths against steering glob patterns and returns applicable guidance.
bun run ${CLAUDE_SKILL_DIR}/scripts/get_applicable_steering.ts --files <file1> [<file2> ...]
Related
04 同仓库更多 Skills
validation-authority
Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.
using-brain-memory
Guidance for using Brain semantic memory effectively. Applies Zettelkasten atomic note principles with observations and relations. Use when deciding whether to query or create notes, structuring note content, or understanding the semantic knowledge graph.
threat-modeling
Structured security analysis using OWASP Four-Question Framework and STRIDE methodology. Generates threat matrices with risk ratings, mitigations, and prioritization. Use for attack surface analysis, security architecture review, or when asking what can go wrong.
taste-lints
Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.
style-enforcement
Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Detects line ending violations, naming convention issues, indentation problems, and charset mismatches across C#, Python, TypeScript, and JavaScript. Produces JSON reports for pre-commit hooks and CI pipelines.
slashcommandcreator
Autonomous meta-skill for creating high-quality custom slash commands using 5-phase workflow with multi-agent validation and quality gates. Use when user requests new slash command, reusable prompt automation, or wants to convert repetitive workflows into documented commands.