Arckit agent security

From tractorjuice/arckit-codex · View interactive version

Arckit agent security is an AI agent skill from the GitHub repository tractorjuice/arckit-codex. Design AI agent security — sandboxing, permissions, injection defences, output validation

How to use this skill

Skill file

You are helping an enterprise architect design an AI agent security architecture that establishes sandboxing, permissions, injection defences, and output validation for autonomous AI agent systems.

User Input

$ARGUMENTS

Instructions

Note: Before generating, scan projects/ for existing project directories. For each project, list all ARC-*.md artifacts, check external/ for reference documents, and check 000-global/ for cross-project policies. If no external docs exist but they would improve output, ask the user.

1. Identify the context

The user should specify:

2. Read existing artifacts from the project context

MANDATORY (warn if missing):

RECOMMENDED (read if available, note if missing):

OPTIONAL (read if available, skip silently if missing):

3. Read the template

Read the template (with user override support):

Tip: Users can customize templates with $arckit-customize agent-security

4. Read agent designs and security context

5. Generate security architecture

A. Threat Model (Mermaid mindmap with ≥12 threat categories)

Map threats across four attack surface dimensions:

B. Sandboxing Architecture

Define isolation boundaries:

C. Tool Permission Matrix (≥5 tools)

For each tool in the agent design:

D. Data Handling Policy

Define handling per data classification:

E. Prompt Injection Defences (≥4 defences)

| Defence | Method | Coverage |

|---------|--------|----------|

| Input sanitization | Regex, LLM guard, allowlist filtering | Direct prompts |

| Context boundary | System prompt separation, delimiter enforcement | Indirect injection |

| Output validation | Schema check, content filter, format enforcement | Response |

| Tool call validation | Permission check, argument validation, rate limiting | Tool abuse |

F. Output Validation Pipeline (Mermaid flowchart)

Design pipeline stages:

G. Secret Management

Define secret lifecycle:

H. Incident Response

Define severity-based response:

6. Risk Assessment

Identify security risks:

7. Generate Security Document

CRITICAL INSTRUCTIONS FOR QUALITY:

  1. This is a LARGE document (threat model + architecture + matrices, 400-800+ lines). You MUST use the Write tool to create the file. DO NOT output the full document to the user (you will exceed token limits).
  1. Follow the template structure with all 9 sections:
  1. Auto-populate from artifacts:
  1. Mermaid diagram requirements:

8. Auto-Populate Document Control Fields

CRITICAL - Auto-Populate Document Control Fields:

Before completing the document, populate ALL document control fields in the header:

Construct Document ID:

Populate Required Fields:

Auto-populated fields (populate these automatically):

User-provided fields (extract from project metadata or user input):

Calculated fields:

Pending fields (leave as [PENDING] until manually updated):

Populate Revision History:

| 1.0 | {DATE} | ArcKit AI | Initial creation from `$arckit-agent-security` command | [PENDING] | [PENDING] |

Populate Generation Metadata Footer:

The footer should be populated with:

**Generated by**: ArcKit `$arckit-agent-security` command
**Generated on**: {DATE} {TIME} GMT
**ArcKit Version**: {ARCKIT_VERSION}
**Project**: {PROJECT_NAME} (Project {PROJECT_ID})
**AI Model**: [Use actual model name, e.g., "Claude Sonnet 5 (session default)"]
**Generation Context**: [Brief note about source documents used]

Before writing the file, read .arckit/references/quality-checklist.md and verify all Common Checks plus the AASE per-type checks pass. Fix any failures before proceeding.

9. Quality Checks

Verify the security architecture meets minimum standards:

10. Write output

CRITICAL - Show Summary Only:

After writing the file, show ONLY a brief summary with key security metrics (threat categories covered, defences implemented, risk posture). Do NOT output the full security document content in your response.

Example Usage

User: $arckit-agent-security research-agent

You should:

Important Notes

Suggested Next Steps

After completing this command, consider running:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.