aegis kernel guard

    by Aditya Verma

    1

    Deterministic zero-trust security runtime to block prompt injection and path traversal in <0.016ms.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    aegis kernel guard

    Example session with this skill installed

    Protect my file-writing tool so it can only write to the ./dist folder and cannot execute any shell commands.

    • Read your context and instructions
    • Compiled the aegis kernel guard

    I have configured the AegisKernel security harness to restrict your tool's capabilities. The implementation uses a deterministic token that blocks all shell execution and limits file writes to the ./dist directory.

    Security Configuration

    from aegis import SecurityKernel, CapabilityToken
    
    # 1. Initialize kernel scoped to the project root
    kernel = SecurityKernel(workspace_root=".")
    
    # 2. Define the restricted capability token
    # This explicitly denies shell access and restricts write operations
    secure_token = CapabilityToken(
        allow_read=["./src", "./config"],
        allow_write=["./dist"],
        allow_shell=False
    )
    
    def safe_file_writer(target_path: str, content: str):
        """
        Wraps file operations in a zero-trust runtime harness.
        Intercepts path traversal and unauthorized writes in <0.016ms.
        """
        command_intent = f"write {target_path}"
        
        # Deterministic AST/POSIX layer validation
        is_safe, reason = kernel.verify_command(command_intent, token=secure_token)
        
        if not is_safe:
            # Blocks execution before the system call reaches the OS
            raise PermissionError(f"[AegisKernel BLOCKED] {reason}")
            
        return kernel.execute_safe(f"echo '{content}' > {target_path}")
    
    # Example usage that would be blocked:
    # safe_file_writer("../.env", "malicious data") -> Raises PermissionError
    

    Next steps

    1. Run pip install aegis-kernel to install the runtime.
    2. Execute python scripts/verify_sandbox.py to test the containment boundary.
    3. Apply this wrapper to any tool handling untrusted input from external APIs.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    LLM-based guardrails are too slow and expensive for real-time security. They add hundreds of milliseconds of latency and drain your token budget while still failing against sophisticated prompt injection. AegisKernel provides a deterministic security runtime that intercepts dangerous tool calls at the system level.

    What it does

    • Zero-latency interception blocks malicious commands in under 0.016ms without secondary LLM calls.
    • Strict workspace containment prevents directory traversal and unauthorized access to files outside defined roots.
    • Subshell protection identifies and drops interactive shell spawning and reverse shell attempts.
    • Capability-based access ensures tools only execute actions explicitly allowed by their assigned tokens.
    • Injection mitigation sanitizes untrusted input from web scrapes or user uploads before they reach the OS.

    How it works

    1. Initialize the SecurityKernel by defining your project workspace root to set the primary boundary.
    2. Define tokens to specify granular permissions for file reads, writes, and shell access for each tool.
    3. Wrap tool calls using the verify_command method to validate AST and POSIX layers before execution.
    4. Execute safely through the kernel to ensure all system calls remain within the verified blast radius.

    Frameworks & tools

    This skill integrates with Python-based agent frameworks, claude-code, and Cursor. It requires the aegis-kernel library and works at the POSIX and AST layers to provide runtime protection for shell and filesystem operations.

    Why this beats prompting it yourself

    System prompts telling an agent to "be secure" are easily bypassed by indirect prompt injection. AegisKernel moves security from the fragile "logical" layer of the LLM to the "deterministic" layer of the code, making escapes computationally impossible.

    Use cases

    • Web-scraping agents that must process untrusted HTML without triggering remote code execution.
    • Auto-coding agents requiring restricted filesystem access to prevent accidental deletion or sensitive data leaks.
    • Multi-agent swarms where subagents need strictly limited capabilities to prevent privilege escalation.
    • Enterprise deployments where autonomous agents handle sensitive .env files or production credentials.

    Known limitations

    Requires the aegis-kernel Python package. It is designed for POSIX-compliant environments and focuses on tool-call security rather than network-level firewalls.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 16 days ago

    Software
    Python

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files
    Browser
    Environment Variables
    Listed16 days ago
    Updated10 days ago

    What's inside

    Frequently Asked Questions

    Unlike LLM-based guardrails that use more tokens and add latency, this skill uses a deterministic POSIX and AST-layer runtime to block injections in under 0.016ms without needing secondary LLM calls.

    The skill is designed for Python-based agent frameworks and integrates directly with tools like `claude-code` and Cursor, provided the environment is POSIX-compliant.

    Integration involves initializing the SecurityKernel with your workspace root and wrapping your agent's tool calls with the `verify_command` method to ensure all actions stay within a safe 'blast radius.'

    Yes, the runtime is specifically engineered to sanitize untrusted inputs from web scrapes or user uploads, preventing them from triggering remote code execution or subshell spawning.

    You will receive the Aegis Kernel Guard skill configuration, access to the `aegis-kernel` library, and documentation for setting up capability-based access tokens for your tools.

    While it provides industry-leading filesystem and shell protection, it focuses on tool-call security and does not replace the need for traditional network-level firewalls.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.