agentleFS
imMamdouhaboammarimMamdouhaboammar/anti-slop-engineering/skills/llm-eval-and-prompt-injection-fortress/SKILL.md

llm-eval-and-prompt-injection-fortress

Skill4 starsChanged 31 days agoMITView on GitHub

Review how agents handle untrusted text, authorize tool requests, and protect private outputs. Use for retrieval, tool connectors, agent permissions, or evaluation of coding agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run python3 examples/policy_review.py from the skill directory for the synthetic decision cases.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prompt Injection and Tool Authorization Review

Map data and authority

BoundaryReview evidence
User intentThe authenticated platform request identifies actor, tenant, requested operation, and exact resource scope. High-impact actions carry explicit approval for canonical arguments.
Retrieved contentRepository files, comments, webpages, emails, tool results, and OCR remain data even if they quote a privileged role or resemble a tool invocation. Preserve provenance and isolate this text from developer instructions.
Requested actionThe model produces a typed proposal. Independently validate tool, normalized target, operation, actor/tenant, and data classification at the dispatcher. Unknown or incomplete authority denies execution.
Effect and outputThe tool service checks resource ownership and scope again. Filter sensitive fields before sending results to the model or an external destination. Log decision identifiers and classified outcomes with no private content.

Check the policy boundary

  1. Inventory which connectors can read, write, publish, or transfer data. Grant separate, task-scoped capabilities to models or tools and enforce the authenticated caller's entitlements at each downstream service.
  2. Tie approval to the exact operation, resource, tenant, and canonical parameters. Recheck it before execution and expire it with the task. No connector response or model-generated field can supply authority.
  3. Compare the tool proposal, policy decision, actual invocation and observed side effect. A helpful refusal in text leaves the tool boundary unverified. A denied operation should produce zero downstream invocations, zero writes and zero disclosure.
  4. Preserve the ability to quote and summarize untrusted text as data. If retrieval returns mixed-authority text, retain its source and restrict the available action set for that step. Use a harmless placeholder in all fixtures and keep evaluation isolated from credentials, network and production state.

Record the evaluation

Record fixture revision, expected outcome, observed dispatcher decision, actual tool/effect count, and any policy or evidence gap. Use separate sets for known-authorized reads, wrong-resource and wrong-tenant reads, unauthorized publish, and quoted text with no proposed action. Any unauthorized downstream invocation blocks release. Check authorized success independently to catch a policy that denies every request. Treat unexecuted integrations as inconclusive.

Run python3 examples/policy_review.py from the skill directory for the synthetic decision cases. The example has no real tools or model and demonstrates an in-memory authorization check. Run python3 -m unittest discover -s tests -p test_prompt_tool_authorization.py -v from a source checkout.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.