소스 정보
- 저장소
- TheArchitectit/agent-guardrails-template
- 최근 소스 활동
- 2026년 8월 15일 19:02
- 감지된 SKILL.md 언어
- 영어
- 스타
- 78
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/TheArchitectit/agent-guardrails-template --skill pi-guardrails-core명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Insert honeypot tokens into sensitive files to detect if an agent leaks their contents in output
Topic-based content filtering to block harmful or unauthorized content in agent output
Access and read guardrails skill documentation, configuration examples, and usage guides at runtime.
SOC 직업 분류 기준
SKILL.md 표시 중
| id | guardrails-core |
| name | Pi Guardrails Core |
| description | Available guardrail tools and automatic enforcement behavior for pi agents |
| version | 1.3.0 |
| tags | ["safety","core","pi"] |
| tools | ["guardrail_init","guardrail_record_read","guardrail_verify_read","guardrail_set_scope","guardrail_check_scope","guardrail_record_attempt","guardrail_check_strikes","guardrail_reset_strikes","guardrail_check_halt","guardrail_log_violation","guardrail_status","guardrail_mcp","guardrail_pre_work_check","guardrail_detect_creep","guardrail_check_pattern","guardrail_validate_git","guardrail_detect_language","guardrail_get_language_profile","guardrail_check_regression","guardrail_verify_fixes","guardrail_register_failure","guardrail_validate_replacement","guardrail_acknowledge_halt","guardrail_read_skill","guardrail_list_skills","guardrail_list_languages"] |
The Four Laws of Agent Safety are enforced automatically via event handlers. You do NOT need to call guardrail tools before every edit — the extension handles enforcement automatically.
The following rules are enforced without any explicit tool calls:
| Handler | Event | Law | What It Does |
|---|---|---|---|
| Read tracking | tool_result | Law 1 | Tracks every file read; blocks edits to unread files |
| Scope enforcement | tool_call | Law 2 | Blocks edits to files outside authorized scope |
| Bash safety | tool_call | Law 4 | Blocks dangerous commands (rm -rf, sudo, force-push) |
| Injection defense | tool_call | Law 4 | Blocks/warns on prompt injection in tool input (bash/write/edit) |
| Output validation | tool_result | Law 3 | Detects secrets/PII in tool output, warns via status bar and logs violation |
| Content filtering | tool_result | Law 3 | Detects denied topic content in output, warns and logs violation |
| Canary tokens | tool_result | Law 3 | Detects canary tokens in output (data exfiltration), alerts via status bar |
| Permissions | tool_call | All | Gates tool access by auto/ask/blocked levels |
When a handler blocks an operation, it also records a halt in the session state. Use guardrail_acknowledge_halt to resume after reviewing the halt reason.
These tools are available for proactive checking before operations:
guardrail_verify_read — Check if a file has been read before editing itguardrail_check_scope — Check if a path is within the authorized scopeguardrail_check_halt — Evaluate whether an operation should be halted (includes uncertainty score)guardrail_init — Initialize a guardrails session at the start of each conversationguardrail_status — Get the full session state summary (scope, strikes, violations, MCP status, halt state)The Three Strikes rule enforces Law 4 (Halt When Uncertain):
guardrail_record_attempt — Record each task attempt (success or failure)guardrail_check_strikes — Check the strike count for a taskguardrail_reset_strikes — Reset strikes after a successful resolution or user escalationAfter 3 consecutive failures on the same task, the system recommends halting and escalating to the user.
guardrail_set_scope — Define which file paths the agent is authorized to operate onguardrail_check_scope — Verify a path is in scope before operating on itguardrail_log_violation — Log a guardrail violation with law, severity, and contextWhen a handler blocks an operation, a halt is recorded in the session state:
guardrail_acknowledge_halt — Acknowledge a halt condition so work can resumeactive → halted → acknowledgedCross-session failure registry for preventing regressions:
guardrail_check_regression — Check if modifying files risks regressing past failuresguardrail_verify_fixes — Verify that past fixes in a file are still intactguardrail_register_failure — Register a past failure with a regression patternguardrail_validate_replacement — Validate that old content in an edit matches the actual file (catches stale edits)guardrail_detect_language — Scan a project directory and return detected languagesguardrail_get_language_profile — Get detected languages + available rules with descriptionsguardrail_validate_git — Validate git commands against branch protection and destructive operation policiesguardrail_read_skill — Read a guardrails skill's SKILL.md documentationguardrail_list_skills — List all available guardrails skillsguardrail_list_languages — List available language-specific prevention rulesguardrail_check_halt returns an uncertaintyScore (0-1):
When the Go MCP server is available, guardrail_mcp proxies calls to it for enhanced enforcement including sandbox execution, canary tokens, extended validation, and policy retrieval.
| Module | Skill | Automatic? | Explicit Tool? |
|---|---|---|---|
| Read tracking | [[guardrails-core]] | Yes (tool_result) | guardrail_verify_read |
| Scope enforcement | [[guardrails-core]] | Yes (tool_call) | guardrail_check_scope |
| Bash safety | [[guardrails-core]] | Yes (tool_call) | guardrail_check_halt |
| Strike tracking | [[guardrails-core]] | No | guardrail_record_attempt/check_strikes |
| Injection defense | [[injection-defense]] | Yes (tool_call) | guardrail_mcp detect_injection |
| Output validation | [[output-security]] | Yes (tool_result) | guardrail_mcp scan_output |
| Content filtering | [[content-safety]] | Warn (tool_result) | guardrail_mcp filter_content |
| Tool permissions | [[tool-permissions]] | Yes (tool_call) | guardrail_mcp set_permission |
| Policy layers | [[policy-config]] | Yes (config load) | guardrail_mcp get_policy |
| Sandbox | [[sandbox-isolation]] | No | guardrail_mcp sandbox_run |
| Canary tokens | [[canary-tokens]] | Warn (tool_result) | guardrail_mcp canary_insert/check |
| Pre-work check | [[guardrails-core]] | No | guardrail_pre_work_check |
| Feature creep | [[guardrails-core]] | No | guardrail_detect_creep |
| Pattern rules | [[guardrails-core]] | No | guardrail_check_pattern |
| Language detection | [[language-detection]] | Auto (on load) | guardrail_detect_language |
| Language profile | [[language-detection]] | No | guardrail_get_language_profile |
| Git validation | [[guardrails-core]] | No | guardrail_validate_git |
| Regression guard | [[guardrails-core]] | No | guardrail_check_regression |
| Fix verification |
| [[guardrails-core]] |
| No |
| guardrail_verify_fixes |
| Failure registry | [[guardrails-core]] | No | guardrail_register_failure |
| Replacement validation | [[guardrails-core]] | No | guardrail_validate_replacement |
| Halt lifecycle | [[guardrails-core]] | Auto (on block) | guardrail_acknowledge_halt |
| Docs access | [[docs-access]] | No | guardrail_read_skill/list_skills |
| Language listing | [[docs-access]] | No | guardrail_list_languages |