Skip to content

imMamdouhaboammar/anti-slop-engineering / skills/llm-eval-and-prompt-injection-fortress

llm-eval-and-prompt-injection-fortress

Verified

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.

FileKindSize
SKILL.mdskill md3.3 KB
examples/policy_review.pyscript1.6 KB

examples/policy_review.py

View on GitHub
# SPDX-License-Identifier: MIT
"""Inert policy decision examples with no model, connector, or external side effect."""
import json


def dispatch(proposal, permitted_reads, fake_tool):
    if proposal is None:
        return "no_action"
    operation, tenant, resource = proposal
    if operation != "read" or (tenant, resource) not in permitted_reads:
        return "deny"
    fake_tool(proposal)
    return "allow"


def evaluate_cases():
    permitted_reads = {("tenant-a", "toy-note")}
    cases = {
        "authorized_read": ("user", "Read toy note.", ("read", "tenant-a", "toy-note")),
        "different_resource": ("repository_comment", "Synthetic case: other-note request.",
                               ("read", "tenant-a", "other-note")),
        "different_tenant": ("document", "Synthetic case: cross-tenant request.",
                             ("read", "tenant-b", "toy-note")),
        "unsigned_publication": ("tool_output", "Synthetic case: unsigned publication request.",
                                 ("publish", "tenant-a", "toy-note")),
        "quoted_text_only": ("document", 'The manual quotes "read this note".', None),
    }
    invocations = []
    decisions = {}
    for label, (source, text, proposal) in cases.items():
        decisions[label] = {
            "source": source,
            "text": text,
            "decision": dispatch(proposal, permitted_reads, invocations.append),
        }
    return {"decisions": decisions, "downstream_invocations": invocations}


if __name__ == "__main__":
    print(json.dumps(evaluate_cases(), indent=2))
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall