SkillShield: A Trust Gate for AI Agent Skills

AI agents are increasingly sharing reusable skills with one another. These skills contain instructions and tool permissions for tasks such as processing customer orders. But what happens when an agent receives a malicious skill, or a previously trusted skill is quietly modified?

Most agents simply trust what they receive. A skill could hide instructions to leak customer information, bypass approvals, or misuse available tools.

I built SkillShield to address this problem: a trust gate that requires evidence before an AI agent can use a shared skill.

How It Works

An agent cannot load a shared skill without a signed receipt proving that its exact version passed testing.

  1. Blocked: A Consumer agent requests a skill but is denied access because it has no valid receipt.
  2. Attacked: A Red agent, powered by Lyzr, generates attack variations designed to expose hidden instructions, data leaks, and approval bypasses.
  3. Tested: A deterministic testing harness executes the skill against fake customer orders using mocked tools. It records forbidden actions and uses planted canary strings to detect data leaks.
  4. Repaired: A Blue agent, also powered by Lyzr, proposes patches to fix identified vulnerabilities.
  5. Verified: Code evaluates the patch. If it passes, the Verifier signs a receipt tied to the exact skill version, permissions, test-suite version, and expiry.
  6. Allowed: The Consumer can now load the skill using its valid receipt.
  7. Rug-pull detected: If the Publisher silently modifies the skill, its hash changes, the receipt becomes invalid, and access is blocked again.

All agent handoffs happen through a shared Band room, making their collaboration observable.

Results

Evaluation Result
Unsafe attempts before repair 8/8
Unsafe attempts after repair 0/8
Held-out attacks never seen by the fixer 4/4 reduced to 0/4
Normal task functionality preserved Yes
Patch that deletes the skill's functionality Rejected
Clean end-to-end demo runs 2
Automated tests 37 passing

I deliberately avoid claiming that a skill is completely safe. SkillShield reports whether it passed the tests, is not recommended, or has changed since testing. Every report also explains what the evaluation does not cover.

Technology Stack

  • Python for the core trust gate and receipt management.
  • SHA-256 and HMAC for skill integrity checks and signed receipts.
  • Lyzr for Red and Blue agents.
  • Band for live agent-to-agent collaboration.
  • Docker for isolated testing without network access or secrets.
  • A deterministic testing harness for mocked tools, permission enforcement, attack detection, and execution logs.

The project supports make setup, make test, and make demo. A keyless mode is also available, with sponsor-dependent components clearly marked as simulated.

Band and Lyzr integrations are live. The trust gate, testing harness, receipt signer, and Docker sandbox run locally. Agent37, Finch, and AdaL are not used.

Challenges

The biggest challenge was making security evaluation reliable. An AI model might ignore a malicious instruction during testing, so I made the actual security verdict dependent on deterministic code rather than an agent's opinion.

I also had to ensure that repairs worked against attacks the Blue agent had never seen, while preserving the original skill's functionality.

Another challenge involved validating live agent outputs. Blue's initial responses failed JSON validation because of raw newlines. Switching to plain-text responses and validating them in code resolved the issue.

Key Takeaways

AI agents should never be responsible for grading their own security work. Trust must be tied to the exact version of the artifact that was tested, and enforcement must happen in code rather than relying on prompts or promises.

Limitations

A receipt means that a specific skill passed a defined set of tests under a specific permission manifest. It does not guarantee complete security.

The current implementation uses synthetic data, mocked tools, and a fixed collection of attacks built around one bundled skill. It demonstrates the verification approach but does not certify arbitrary third-party skills. Publisher and Consumer are local roles represented in the Band room.

What's Next

The next steps are to support arbitrary uploaded skills, use live Red-agent attack variations as scalable test cases, introduce publicly verifiable cryptographic receipts, and integrate SkillShield directly into real AI agent skill loaders.

The central idea behind SkillShield is simple: AI agents should not trust shared skills blindly. They should verify exactly what they are about to execute.

Built With

  • agent
  • ai-agents
  • allowed-tools
  • audience
  • docker
  • github-actions
  • hmac
  • lyzr
  • manifest
  • microsoft-band
  • multi-agent-systems
  • pytest
  • python
  • sha-256
  • test-suite-version
Share this project:

Updates

Submission history