[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD4PE42FP3P72JQ8ZTAY04":3,"skill-same:01M6AD4PE42FP3P72JQ8ZTAY04":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6AD4PE42FP3P72JQ8ZTAY04","agent-governance",null,"Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when:\n- Building AI agents that call external tools (APIs, databases, file systems)\n- Implementing policy-based access controls for agent tool usage\n- Adding semantic intent classification to detect dangerous prompts\n- Creating trust scoring systems for multi-agent workflows\n- Building audit trails for agent actions and decisions\n- Enforcing rate limits, content filters, or tool restrictions on agents\n- Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41081,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fagent-governance\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"governance","agent governance","when","ai agents","limits","rate","agent tool","implementing","external tools","scoring","intent","filters","databases","access","Safety","actions","audit","file","content","framework","openai","workflows","agent framework","autogen","ai agent","policy","2026-11-10 10:12:30",false,"---\nname: agent-governance\ndescription: |\n  Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when:\n  - Building AI agents that call external tools (APIs, databases, file systems)\n  - Implementing policy-based access controls for agent tool usage\n  - Adding semantic intent classification to detect dangerous prompts\n  - Creating trust scoring systems for multi-agent workflows\n  - Building audit trails for agent actions and decisions\n  - Enforcing rate limits, content filters, or tool restrictions on agents\n  - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)\n---\n\n# Agent Governance Patterns\n\nPatterns for adding safety, trust, and policy enforcement to AI agent systems.\n\n## Overview\n\nGovernance patterns ensure AI agents operate within defined boundaries — controlling which tools they can call, what content they can process, how much they can do, and maintaining accountability through audit trails.\n\n```\nUser Request → Intent Classification → Policy Check → Tool Execution → Audit Log\n                     ↓                      ↓               ↓\n              Threat Detection         Allow\u002FDeny      Trust Update\n```\n\n## When to Use\n\n- **Agents with tool access**: Any agent that calls external tools (APIs, databases, shell commands)\n- **Multi-agent systems**: Agents delegating to other agents need trust boundaries\n- **Production deployments**: Compliance, audit, and safety requirements\n- **Sensitive operations**: Financial transactions, data access, infrastructure management\n\n---\n\n## Pattern 1: Governance Policy\n\nDefine what an agent is allowed to do as a composable, serializable policy object.\n\n```python\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom typing import Optional\nimport re\n\nclass PolicyAction(Enum):\n    ALLOW = \"allow\"\n    DENY = \"deny\"\n    REVIEW = \"review\"  # flag for human review\n\n@dataclass\nclass GovernancePolicy:\n    \"\"\"Declarative policy controlling agent behavior.\"\"\"\n    name: str\n    allowed_tools: list[str] = field(default_factory=list)       # allowlist\n    blocked_tools: list[str] = field(default_factory=list)       # blocklist\n    blocked_patterns: list[str] = field(default_factory=list)    # content filters\n    max_calls_per_request: int = 100                             # rate limit\n    require_human_approval: list[str] = field(default_factory=list)  # tools needing approval\n\n    def check_tool(self, tool_name: str) -> PolicyAction:\n        \"\"\"Check if a tool is allowed by this policy.\"\"\"\n        if tool_name in self.blocked_tools:\n            return PolicyAction.DENY\n        if tool_name in self.require_human_approval:\n            return PolicyAction.REVIEW\n        if self.allowed_tools and tool_name not in self.allowed_tools:\n            return PolicyAction.DENY\n        return PolicyAction.ALLOW\n\n    def check_content(self, content: str) -> Optional[str]:\n        \"\"\"Check content against blocked patterns. Returns matched pattern or None.\"\"\"\n        for pattern in self.blocked_patterns:\n            if re.search(pattern, content, re.IGNORECASE):\n                return pattern\n        return None\n```\n\n### Policy Composition\n\nCombine multiple policies (e.g., org-wide + team + agent-specific):\n\n```python\ndef compose_policies(*policies: GovernancePolicy) -> GovernancePolicy:\n    \"\"\"Merge policies with most-restrictive-wins semantics.\"\"\"\n    combined = GovernancePolicy(name=\"composed\")\n\n    for policy in policies:\n        combined.blocked_tools.extend(policy.blocked_tools)\n        combined.blocked_patterns.extend(policy.blocked_patterns)\n        combined.require_human_approval.extend(policy.require_human_approval)\n        combined.max_calls_per_request = min(\n            combined.max_calls_per_request,\n            policy.max_calls_per_request\n        )\n        if policy.allowed_tools:\n            if combined.allowed_tools:\n                combined.allowed_tools = [\n                    t for t in combined.allowed_tools if t in policy.allowed_tools\n                ]\n            else:\n                combined.allowed_tools = list(policy.allowed_tools)\n\n    return combined\n\n\n# Usage: layer policies from broad to specific\norg_policy = GovernancePolicy(\n    name=\"org-wide\",\n    blocked_tools=[\"shell_exec\", \"delete_database\"],\n    blocked_patterns=[r\"(?i)(api[_-]?key|secret|password)\\s*[:=]\"],\n    max_calls_per_request=50\n)\nteam_policy = GovernancePolicy(\n    name=\"data-team\",\n    allowed_tools=[\"query_db\", \"read_file\", \"write_report\"],\n    require_human_approval=[\"write_report\"]\n)\nagent_policy = compose_policies(org_policy, team_policy)\n```\n\n### Policy as YAML\n\nStore policies as configuration, not code:\n\n```yaml\n# governance-policy.yaml\nname: production-agent\nallowed_tools:\n  - search_documents\n  - query_database\n  - send_email\nblocked_tools:\n  - shell_exec\n  - delete_record\nblocked_patterns:\n  - \"(?i)(api[_-]?key|secret|password)\\\\s*[:=]\"\n  - \"(?i)(drop|truncate|delete from)\\\\s+\\\\w+\"\nmax_calls_per_request: 25\nrequire_human_approval:\n  - send_email\n```\n\n```python\nimport yaml\n\ndef load_policy(path: str) -> GovernancePolicy:\n    with open(path) as f:\n        data = yaml.safe_load(f)\n    return GovernancePolicy(**data)\n```\n\n---\n\n## Pattern 2: Semantic Intent Classification\n\nDetect dangerous intent in prompts before they reach the agent, using pattern-based signals.\n\n```python\nfrom dataclasses import dataclass\n\n@dataclass\nclass IntentSignal:\n    category: str       # e.g., \"data_exfiltration\", \"privilege_escalation\"\n    confidence: float   # 0.0 to 1.0\n    evidence: str       # what triggered the detection\n\n# Weighted signal patterns for threat detection\nTHREAT_SIGNALS = [\n    # Data exfiltration\n    (r\"(?i)send\\s+(all|every|entire)\\s+\\w+\\s+to\\s+\", \"data_exfiltration\", 0.8),\n    (r\"(?i)export\\s+.*\\s+to\\s+(external|outside|third.?party)\", \"data_exfiltration\", 0.9),\n    (r\"(?i)curl\\s+.*\\s+-d\\s+\", \"data_exfiltration\", 0.7),\n\n    # Privilege escalation\n    (r\"(?i)(sudo|as\\s+root|admin\\s+access)\", \"privilege_escalation\", 0.8),\n    (r\"(?i)chmod\\s+777\", \"privilege_escalation\", 0.9),\n\n    # System modification\n    (r\"(?i)(rm\\s+-rf|del\\s+\u002F[sq]|format\\s+c:)\", \"system_destruction\", 0.95),\n    (r\"(?i)(drop\\s+database|truncate\\s+table)\", \"system_destruction\", 0.9),\n\n    # Prompt injection\n    (r\"(?i)ignore\\s+(previous|above|all)\\s+(instructions?|rules?)\", \"prompt_injection\", 0.9),\n    (r\"(?i)you\\s+are\\s+now\\s+(a|an)\\s+\", \"prompt_injection\", 0.7),\n]\n\ndef classify_intent(content: str) -> list[IntentSignal]:\n    \"\"\"Classify content for threat signals.\"\"\"\n    signals = []\n    for pattern, category, weight in THREAT_SIGNALS:\n        match = re.search(pattern, content)\n        if match:\n            signals.append(IntentSignal(\n                category=category,\n                confidence=weight,\n                evidence=match.group()\n            ))\n    return signals\n\ndef is_safe(content: str, threshold: float = 0.7) -> bool:\n    \"\"\"Quick check: is the content safe above the given threshold?\"\"\"\n    signals = classify_intent(content)\n    return not any(s.confidence >= threshold for s in signals)\n```\n\n**Key insight**: Intent classification happens *before* tool execution, acting as a pre-flight safety check. This is fundamentally different from output guardrails which only check *after* generation.\n\n---\n\n## Pattern 3: Tool-Level Governance Decorator\n\nWrap individual tool functions with governance checks:\n\n```python\nimport functools\nimport time\nfrom collections import defaultdict\n\n_call_counters: dict[str, int] = defaultdict(int)\n\ndef govern(policy: GovernancePolicy, audit_trail=None):\n    \"\"\"Decorator that enforces governance policy on a tool function.\"\"\"\n    def decorator(func):\n        @functools.wraps(func)\n        async def wrapper(*args, **kwargs):\n            tool_name = func.__name__\n\n            # 1. Check tool allowlist\u002Fblocklist\n            action = policy.check_tool(tool_name)\n            if action == PolicyAction.DENY:\n                raise PermissionError(f\"Policy '{policy.name}' blocks tool '{tool_name}'\")\n            if action == PolicyAction.REVIEW:\n                raise PermissionError(f\"Tool '{tool_name}' requires human approval\")\n\n            # 2. Check rate limit\n            _call_counters[policy.name] += 1\n            if _call_counters[policy.name] > policy.max_calls_per_request:\n                raise PermissionError(f\"Rate limit exceeded: {policy.max_calls_per_request} calls\")\n\n            # 3. Check content in arguments\n            for arg in list(args) + list(kwargs.values()):\n                if isinstance(arg, str):\n                    matched = policy.check_content(arg)\n                    if matched:\n                        raise PermissionError(f\"Blocked pattern detected: {matched}\")\n\n            # 4. Execute and audit\n            start = time.monotonic()\n            try:\n                result = await func(*args, **kwargs)\n                if audit_trail is not None:\n                    audit_trail.append({\n                        \"tool\": tool_name,\n                        \"action\": \"allowed\",\n                        \"duration_ms\": (time.monotonic() - start) * 1000,\n                        \"timestamp\": time.time()\n                    })\n                return result\n            except Exception as e:\n                if audit_trail is not None:\n                    audit_trail.append({\n                        \"tool\": tool_name,\n                        \"action\": \"error\",\n                        \"error\": str(e),\n                        \"timestamp\": time.time()\n                    })\n                raise\n\n        return wrapper\n    return decorator\n\n\n# Usage with any agent framework\naudit_log = []\npolicy = GovernancePolicy(\n    name=\"search-agent\",\n    allowed_tools=[\"search\", \"summarize\"],\n    blocked_patterns=[r\"(?i)password\"],\n    max_calls_per_request=10\n)\n\n@govern(policy, audit_trail=audit_log)\nasync def search(query: str) -> str:\n    \"\"\"Search documents — governed by policy.\"\"\"\n    return f\"Results for: {query}\"\n\n# Passes: search(\"latest quarterly report\")\n# Blocked: search(\"show me the admin password\")\n```\n\n---\n\n## Pattern 4: Trust Scoring\n\nTrack agent reliability over time with decay-based trust scores:\n\n```python\nfrom dataclasses import dataclass, field\nimport math\nimport time\n\n@dataclass\nclass TrustScore:\n    \"\"\"Trust score with temporal decay.\"\"\"\n    score: float = 0.5          # 0.0 (untrusted) to 1.0 (fully trusted)\n    successes: int = 0\n    failures: int = 0\n    last_updated: float = field(default_factory=time.time)\n\n    def record_success(self, reward: float = 0.05):\n        self.successes += 1\n        self.score = min(1.0, self.score + reward * (1 - self.score))\n        self.last_updated = time.time()\n\n    def record_failure(self, penalty: float = 0.15):\n        self.failures += 1\n        self.score = max(0.0, self.score - penalty * self.score)\n        self.last_updated = time.time()\n\n    def current(self, decay_rate: float = 0.001) -> float:\n        \"\"\"Get score with temporal decay — trust erodes without activity.\"\"\"\n        elapsed = time.time() - self.last_updated\n        decay = math.exp(-decay_rate * elapsed)\n        return self.score * decay\n\n    @property\n    def reliability(self) -> float:\n        total = self.successes + self.failures\n        return self.successes \u002F total if total > 0 else 0.0\n\n\n# Usage in multi-agent systems\ntrust = TrustScore()\n\n# Agent completes tasks successfully\ntrust.record_success()  # 0.525\ntrust.record_success()  # 0.549\n\n# Agent makes an error\ntrust.record_failure()  # 0.467\n\n# Gate sensitive operations on trust\nif trust.current() >= 0.7:\n    # Allow autonomous operation\n    pass\nelif trust.current() >= 0.4:\n    # Allow with human oversight\n    pass\nelse:\n    # Deny or require explicit approval\n    pass\n```\n\n**Multi-agent trust**: In systems where agents delegate to other agents, each agent maintains trust scores for its delegates:\n\n```python\nclass AgentTrustRegistry:\n    def __init__(self):\n        self.scores: dict[str, TrustScore] = {}\n\n    def get_trust(self, agent_id: str) -> TrustScore:\n        if agent_id not in self.scores:\n            self.scores[agent_id] = TrustScore()\n        return self.scores[agent_id]\n\n    def most_trusted(self, agents: list[str]) -> str:\n        return max(agents, key=lambda a: self.get_trust(a).current())\n\n    def meets_threshold(self, agent_id: str, threshold: float) -> bool:\n        return self.get_trust(agent_id).current() >= threshold\n```\n\n---\n\n## Pattern 5: Audit Trail\n\nAppend-only audit log for all agent actions — critical for compliance and debugging:\n\n```python\nfrom dataclasses import dataclass, field\nimport json\nimport time\n\n@dataclass\nclass AuditEntry:\n    timestamp: float\n    agent_id: str\n    tool_name: str\n    action: str           # \"allowed\", \"denied\", \"error\"\n    policy_name: str\n    details: dict = field(default_factory=dict)\n\nclass AuditTrail:\n    \"\"\"Append-only audit trail for agent governance events.\"\"\"\n    def __init__(self):\n        self._entries: list[AuditEntry] = []\n\n    def log(self, agent_id: str, tool_name: str, action: str,\n            policy_name: str, **details):\n        self._entries.append(AuditEntry(\n            timestamp=time.time(),\n            agent_id=agent_id,\n            tool_name=tool_name,\n            action=action,\n            policy_name=policy_name,\n            details=details\n        ))\n\n    def denied(self) -> list[AuditEntry]:\n        \"\"\"Get all denied actions — useful for security review.\"\"\"\n        return [e for e in self._entries if e.action == \"denied\"]\n\n    def by_agent(self, agent_id: str) -> list[AuditEntry]:\n        return [e for e in self._entries if e.agent_id == agent_id]\n\n    def export_jsonl(self, path: str):\n        \"\"\"Export as JSON Lines for log aggregation systems.\"\"\"\n        with open(path, \"w\") as f:\n            for entry in self._entries:\n                f.write(json.dumps({\n                    \"timestamp\": entry.timestamp,\n                    \"agent_id\": entry.agent_id,\n                    \"tool\": entry.tool_name,\n                    \"action\": entry.action,\n                    \"policy\": entry.policy_name,\n                    **entry.details\n                }) + \"\\n\")\n```\n\n---\n\n## Pattern 6: Framework Integration\n\n### PydanticAI\n\n```python\nfrom pydantic_ai import Agent\n\npolicy = GovernancePolicy(\n    name=\"support-bot\",\n    allowed_tools=[\"search_docs\", \"create_ticket\"],\n    blocked_patterns=[r\"(?i)(ssn|social\\s+security|credit\\s+card)\"],\n    max_calls_per_request=20\n)\n\nagent = Agent(\"openai:gpt-4o\", system_prompt=\"You are a support assistant.\")\n\n@agent.tool\n@govern(policy)\nasync def search_docs(ctx, query: str) -> str:\n    \"\"\"Search knowledge base — governed.\"\"\"\n    return await kb.search(query)\n\n@agent.tool\n@govern(policy)\nasync def create_ticket(ctx, title: str, body: str) -> str:\n    \"\"\"Create support ticket — governed.\"\"\"\n    return await tickets.create(title=title, body=body)\n```\n\n### CrewAI\n\n```python\nfrom crewai import Agent, Task, Crew\n\npolicy = GovernancePolicy(\n    name=\"research-crew\",\n    allowed_tools=[\"search\", \"analyze\"],\n    max_calls_per_request=30\n)\n\n# Apply governance at the crew level\ndef governed_crew_run(crew: Crew, policy: GovernancePolicy):\n    \"\"\"Wrap crew execution with governance checks.\"\"\"\n    audit = AuditTrail()\n    for agent in crew.agents:\n        for tool in agent.tools:\n            original = tool.func\n            tool.func = govern(policy, audit_trail=audit)(original)\n    result = crew.kickoff()\n    return result, audit\n```\n\n### OpenAI Agents SDK\n\n```python\nfrom agents import Agent, function_tool\n\npolicy = GovernancePolicy(\n    name=\"coding-agent\",\n    allowed_tools=[\"read_file\", \"write_file\", \"run_tests\"],\n    blocked_tools=[\"shell_exec\"],\n    max_calls_per_request=50\n)\n\n@function_tool\n@govern(policy)\nasync def read_file(path: str) -> str:\n    \"\"\"Read file contents — governed.\"\"\"\n    import os\n    safe_path = os.path.realpath(path)\n    if not safe_path.startswith(os.path.realpath(\".\")):\n        raise ValueError(\"Path traversal blocked by governance\")\n    with open(safe_path) as f:\n        return f.read()\n```\n\n---\n\n## Governance Levels\n\nMatch governance strictness to risk level:\n\n| Level | Controls | Use Case |\n|-------|----------|----------|\n| **Open** | Audit only, no restrictions | Internal dev\u002Ftesting |\n| **Standard** | Tool allowlist + content filters | General production agents |\n| **Strict** | All controls + human approval for sensitive ops | Financial, healthcare, legal |\n| **Locked** | Allowlist only, no dynamic tools, full audit | Compliance-critical systems |\n\n---\n\n## Best Practices\n\n| Practice | Rationale |\n|----------|-----------|\n| **Policy as configuration** | Store policies in YAML\u002FJSON, not hardcoded — enables change without deploys |\n| **Most-restrictive-wins** | When composing policies, deny always overrides allow |\n| **Pre-flight intent check** | Classify intent *before* tool execution, not after |\n| **Trust decay** | Trust scores should decay over time — require ongoing good behavior |\n| **Append-only audit** | Never modify or delete audit entries — immutability enables compliance |\n| **Fail closed** | If governance check errors, deny the action rather than allowing it |\n| **Separate policy from logic** | Governance enforcement should be independent of agent business logic |\n\n---\n\n## Quick Start Checklist\n\n```markdown\n## Agent Governance Implementation Checklist\n\n### Setup\n- [ ] Define governance policy (allowed tools, blocked patterns, rate limits)\n- [ ] Choose governance level (open\u002Fstandard\u002Fstrict\u002Flocked)\n- [ ] Set up audit trail storage\n\n### Implementation\n- [ ] Add @govern decorator to all tool functions\n- [ ] Add intent classification to user input processing\n- [ ] Implement trust scoring for multi-agent interactions\n- [ ] Wire up audit trail export\n\n### Validation\n- [ ] Test that blocked tools are properly denied\n- [ ] Test that content filters catch sensitive patterns\n- [ ] Test rate limiting behavior\n- [ ] Verify audit trail captures all events\n- [ ] Test policy composition (most-restrictive-wins)\n```\n\n---\n\n## Related Resources\n\n- [Agent Governance Toolkit](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-governance-toolkit) — Full governance framework\n- [AgentMesh Integrations](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-governance-toolkit\u002Ftree\u002Fmain\u002Fpackages\u002Fagentmesh-integrations) — Framework-specific packages\n- [OWASP Top 10 for LLM Applications](https:\u002F\u002Fowasp.org\u002Fwww-project-top-10-for-large-language-model-applications\u002F)\n","# Agent Governance Patterns\n\nPatterns for adding safety, trust, and policy enforcement to AI agent systems.\n\n## Overview\n\nGovernance patterns ensure AI agents operate within defined boundaries — controlling which tools they can call, what content they can process, how much they can do, and maintaining accountability through audit trails.\n\n```\nUser Request → Intent Classification → Policy Check → Tool Execution → Audit Log\n                     ↓                      ↓               ↓\n              Threat Detection         Allow\u002FDeny      Trust Update\n```\n\n## When to Use\n\n- **Agents with tool access**: Any agent that calls external tools (APIs, databases, shell commands)\n- **Multi-agent systems**: Agents delegating to other agents need trust boundaries\n- **Production deployments**: Compliance, audit, and safety requirements\n- **Sensitive operations**: Financial transactions, data access, infrastructure management\n\n---\n\n## Pattern 1: Governance Policy\n\nDefine what an agent is allowed to do as a composable, serializable policy object.\n\n```python\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom typing import Optional\nimport re\n\nclass PolicyAction(Enum):\n    ALLOW = \"allow\"\n    DENY = \"deny\"\n    REVIEW = \"review\"  # flag for human review\n\n@dataclass\nclass GovernancePolicy:\n    \"\"\"Declarative policy controlling agent behavior.\"\"\"\n    name: str\n    allowed_tools: list[str] = field(default_factory=list)       # allowlist\n    blocked_tools: list[str] = field(default_factory=list)       # blocklist\n    blocked_patterns: list[str] = field(default_factory=list)    # content filters\n    max_calls_per_request: int = 100                             # rate limit\n    require_human_approval: list[str] = field(default_factory=list)  # tools needing approval\n\n    def check_tool(self, tool_name: str) -> PolicyAction:\n        \"\"\"Check if a tool is allowed by this policy.\"\"\"\n        if tool_name in self.blocked_tools:\n            return PolicyAction.DENY\n        if tool_name in self.require_human_approval:\n            return PolicyAction.REVIEW\n        if self.allowed_tools and tool_name not in self.allowed_tools:\n            return PolicyAction.DENY\n        return PolicyAction.ALLOW\n\n    def check_content(self, content: str) -> Optional[str]:\n        \"\"\"Check content against blocked patterns. Returns matched pattern or None.\"\"\"\n        for pattern in self.blocked_patterns:\n            if re.search(pattern, content, re.IGNORECASE):\n                return pattern\n        return None\n```\n\n### Policy Composition\n\nCombine multiple policies (e.g., org-wide + team + agent-specific):\n\n```python\ndef compose_policies(*policies: GovernancePolicy) -> GovernancePolicy:\n    \"\"\"Merge policies with most-restrictive-wins semantics.\"\"\"\n    combined = GovernancePolicy(name=\"composed\")\n\n    for policy in policies:\n        combined.blocked_tools.extend(policy.blocked_tools)\n        combined.blocked_patterns.extend(policy.blocked_patterns)\n        combined.require_human_approval.extend(policy.require_human_approval)\n        combined.max_calls_per_request = min(\n            combined.max_calls_per_request,\n            policy.max_calls_per_request\n        )\n        if policy.allowed_tools:\n            if combined.allowed_tools:\n                combined.allowed_tools = [\n                    t for t in combined.allowed_tools if t in policy.allowed_tools\n                ]\n            else:\n                combined.allowed_tools = list(policy.allowed_tools)\n\n    return combined\n\n\n# Usage: layer policies from broad to specific\norg_policy = GovernancePolicy(\n    name=\"org-wide\",\n    blocked_tools=[\"shell_exec\", \"delete_database\"],\n    blocked_patterns=[r\"(?i)(api[_-]?key|secret|password)\\s*[:=]\"],\n    max_calls_per_request=50\n)\nteam_policy = GovernancePolicy(\n    name=\"data-team\",\n    allowed_tools=[\"query_db\", \"read_file\", \"write_report\"],\n    require_human_approval=[\"write_report\"]\n)\nagent_policy = compose_policies(org_policy, team_policy)\n```\n\n### Policy as YAML\n\nStore policies as configuration, not code:\n\n```yaml\n# governance-policy.yaml\nname: production-agent\nallowed_tools:\n  - search_documents\n  - query_database\n  - send_email\nblocked_tools:\n  - shell_exec\n  - delete_record\nblocked_patterns:\n  - \"(?i)(api[_-]?key|secret|password)\\\\s*[:=]\"\n  - \"(?i)(drop|truncate|delete from)\\\\s+\\\\w+\"\nmax_calls_per_request: 25\nrequire_human_approval:\n  - send_email\n```\n\n```python\nimport yaml\n\ndef load_policy(path: str) -> GovernancePolicy:\n    with open(path) as f:\n        data = yaml.safe_load(f)\n    return GovernancePolicy(**data)\n```\n\n---\n\n## Pattern 2: Semantic Intent Classification\n\nDetect dangerous intent in prompts before they reach the agent, using pattern-based signals.\n\n```python\nfrom dataclasses import dataclass\n\n@dataclass\nclass IntentSignal:\n    category: str       # e.g., \"data_exfiltration\", \"privilege_escalation\"\n    confidence: float   # 0.0 to 1.0\n    evidence: str       # what triggered the detection\n\n# Weighted signal patterns for threat detection\nTHREAT_SIGNALS = [\n    # Data exfiltration\n    (r\"(?i)send\\s+(all|every|entire)\\s+\\w+\\s+to\\s+\", \"data_exfiltration\", 0.8),\n    (r\"(?i)export\\s+.*\\s+to\\s+(external|outside|third.?party)\", \"data_exfiltration\", 0.9),\n    (r\"(?i)curl\\s+.*\\s+-d\\s+\", \"data_exfiltration\", 0.7),\n\n    # Privilege escalation\n    (r\"(?i)(sudo|as\\s+root|admin\\s+access)\", \"privilege_escalation\", 0.8),\n    (r\"(?i)chmod\\s+777\", \"privilege_escalation\", 0.9),\n\n    # System modification\n    (r\"(?i)(rm\\s+-rf|del\\s+\u002F[sq]|format\\s+c:)\", \"system_destruction\", 0.95),\n    (r\"(?i)(drop\\s+database|truncate\\s+table)\", \"system_destruction\", 0.9),\n\n    # Prompt injection\n    (r\"(?i)ignore\\s+(previous|above|all)\\s+(instructions?|rules?)\", \"prompt_injection\", 0.9),\n    (r\"(?i)you\\s+are\\s+now\\s+(a|an)\\s+\", \"prompt_injection\", 0.7),\n]\n\ndef classify_intent(content: str) -> list[IntentSignal]:\n    \"\"\"Classify content for threat signals.\"\"\"\n    signals = []\n    for pattern, category, weight in THREAT_SIGNALS:\n        match = re.search(pattern, content)\n        if match:\n            signals.append(IntentSignal(\n                category=category,\n                confidence=weight,\n                evidence=match.group()\n            ))\n    return signals\n\ndef is_safe(content: str, threshold: float = 0.7) -> bool:\n    \"\"\"Quick check: is the content safe above the given threshold?\"\"\"\n    signals = classify_intent(content)\n    return not any(s.confidence >= threshold for s in signals)\n```\n\n**Key insight**: Intent classification happens *before* tool execution, acting as a pre-flight safety check. This is fundamentally different from output guardrails which only check *after* generation.\n\n---\n\n## Pattern 3: Tool-Level Governance Decorator\n\nWrap individual tool functions with governance checks:\n\n```python\nimport functools\nimport time\nfrom collections import defaultdict\n\n_call_counters: dict[str, int] = defaultdict(int)\n\ndef govern(policy: GovernancePolicy, audit_trail=None):\n    \"\"\"Decorator that enforces governance policy on a tool function.\"\"\"\n    def decorator(func):\n        @functools.wraps(func)\n        async def wrapper(*args, **kwargs):\n            tool_name = func.__name__\n\n            # 1. Check tool allowlist\u002Fblocklist\n            action = policy.check_tool(tool_name)\n            if action == PolicyAction.DENY:\n                raise PermissionError(f\"Policy '{policy.name}' blocks tool '{tool_name}'\")\n            if action == PolicyAction.REVIEW:\n                raise PermissionError(f\"Tool '{tool_name}' requires human approval\")\n\n            # 2. Check rate limit\n            _call_counters[policy.name] += 1\n            if _call_counters[policy.name] > policy.max_calls_per_request:\n                raise PermissionError(f\"Rate limit exceeded: {policy.max_calls_per_request} calls\")\n\n            # 3. Check content in arguments\n            for arg in list(args) + list(kwargs.values()):\n                if isinstance(arg, str):\n                    matched = policy.check_content(arg)\n                    if matched:\n                        raise PermissionError(f\"Blocked pattern detected: {matched}\")\n\n            # 4. Execute and audit\n            start = time.monotonic()\n            try:\n                result = await func(*args, **kwargs)\n                if audit_trail is not None:\n                    audit_trail.append({\n                        \"tool\": tool_name,\n                        \"action\": \"allowed\",\n                        \"duration_ms\": (time.monotonic() - start) * 1000,\n                        \"timestamp\": time.time()\n                    })\n                return result\n            except Exception as e:\n                if audit_trail is not None:\n                    audit_trail.append({\n                        \"tool\": tool_name,\n                        \"action\": \"error\",\n                        \"error\": str(e),\n                        \"timestamp\": time.time()\n                    })\n                raise\n\n        return wrapper\n    return decorator\n\n\n# Usage with any agent framework\naudit_log = []\npolicy = GovernancePolicy(\n    name=\"search-agent\",\n    allowed_tools=[\"search\", \"summarize\"],\n    blocked_patterns=[r\"(?i)password\"],\n    max_calls_per_request=10\n)\n\n@govern(policy, audit_trail=audit_log)\nasync def search(query: str) -> str:\n    \"\"\"Search documents — governed by policy.\"\"\"\n    return f\"Results for: {query}\"\n\n# Passes: search(\"latest quarterly report\")\n# Blocked: search(\"show me the admin password\")\n```\n\n---\n\n## Pattern 4: Trust Scoring\n\nTrack agent reliability over time with decay-based trust scores:\n\n```python\nfrom dataclasses import dataclass, field\nimport math\nimport time\n\n@dataclass\nclass TrustScore:\n    \"\"\"Trust score with temporal decay.\"\"\"\n    score: float = 0.5          # 0.0 (untrusted) to 1.0 (fully trusted)\n    successes: int = 0\n    failures: int = 0\n    last_updated: float = field(default_factory=time.time)\n\n    def record_success(self, reward: float = 0.05):\n        self.successes += 1\n        self.score = min(1.0, self.score + reward * (1 - self.score))\n        self.last_updated = time.time()\n\n    def record_failure(self, penalty: float = 0.15):\n        self.failures += 1\n        self.score = max(0.0, self.score - penalty * self.score)\n        self.last_updated = time.time()\n\n    def current(self, decay_rate: float = 0.001) -> float:\n        \"\"\"Get score with temporal decay — trust erodes without activity.\"\"\"\n        elapsed = time.time() - self.last_updated\n        decay = math.exp(-decay_rate * elapsed)\n        return self.score * decay\n\n    @property\n    def reliability(self) -> float:\n        total = self.successes + self.failures\n        return self.successes \u002F total if total > 0 else 0.0\n\n\n# Usage in multi-agent systems\ntrust = TrustScore()\n\n# Agent completes tasks successfully\ntrust.record_success()  # 0.525\ntrust.record_success()  # 0.549\n\n# Agent makes an error\ntrust.record_failure()  # 0.467\n\n# Gate sensitive operations on trust\nif trust.current() >= 0.7:\n    # Allow autonomous operation\n    pass\nelif trust.current() >= 0.4:\n    # Allow with human oversight\n    pass\nelse:\n    # Deny or require explicit approval\n    pass\n```\n\n**Multi-agent trust**: In systems where agents delegate to other agents, each agent maintains trust scores for its delegates:\n\n```python\nclass AgentTrustRegistry:\n    def __init__(self):\n        self.scores: dict[str, TrustScore] = {}\n\n    def get_trust(self, agent_id: str) -> TrustScore:\n        if agent_id not in self.scores:\n            self.scores[agent_id] = TrustScore()\n        return self.scores[agent_id]\n\n    def most_trusted(self, agents: list[str]) -> str:\n        return max(agents, key=lambda a: self.get_trust(a).current())\n\n    def meets_threshold(self, agent_id: str, threshold: float) -> bool:\n        return self.get_trust(agent_id).current() >= threshold\n```\n\n---\n\n## Pattern 5: Audit Trail\n\nAppend-only audit log for all agent actions — critical for compliance and debugging:\n\n```python\nfrom dataclasses import dataclass, field\nimport json\nimport time\n\n@dataclass\nclass AuditEntry:\n    timestamp: float\n    agent_id: str\n    tool_name: str\n    action: str           # \"allowed\", \"denied\", \"error\"\n    policy_name: str\n    details: dict = field(default_factory=dict)\n\nclass AuditTrail:\n    \"\"\"Append-only audit trail for agent governance events.\"\"\"\n    def __init__(self):\n        self._entries: list[AuditEntry] = []\n\n    def log(self, agent_id: str, tool_name: str, action: str,\n            policy_name: str, **details):\n        self._entries.append(AuditEntry(\n            timestamp=time.time(),\n            agent_id=agent_id,\n            tool_name=tool_name,\n            action=action,\n            policy_name=policy_name,\n            details=details\n        ))\n\n    def denied(self) -> list[AuditEntry]:\n        \"\"\"Get all denied actions — useful for security review.\"\"\"\n        return [e for e in self._entries if e.action == \"denied\"]\n\n    def by_agent(self, agent_id: str) -> list[AuditEntry]:\n        return [e for e in self._entries if e.agent_id == agent_id]\n\n    def export_jsonl(self, path: str):\n        \"\"\"Export as JSON Lines for log aggregation systems.\"\"\"\n        with open(path, \"w\") as f:\n            for entry in self._entries:\n                f.write(json.dumps({\n                    \"timestamp\": entry.timestamp,\n                    \"agent_id\": entry.agent_id,\n                    \"tool\": entry.tool_name,\n                    \"action\": entry.action,\n                    \"policy\": entry.policy_name,\n                    **entry.details\n                }) + \"\\n\")\n```\n\n---\n\n## Pattern 6: Framework Integration\n\n### PydanticAI\n\n```python\nfrom pydantic_ai import Agent\n\npolicy = GovernancePolicy(\n    name=\"support-bot\",\n    allowed_tools=[\"search_docs\", \"create_ticket\"],\n    blocked_patterns=[r\"(?i)(ssn|social\\s+security|credit\\s+card)\"],\n    max_calls_per_request=20\n)\n\nagent = Agent(\"openai:gpt-4o\", system_prompt=\"You are a support assistant.\")\n\n@agent.tool\n@govern(policy)\nasync def search_docs(ctx, query: str) -> str:\n    \"\"\"Search knowledge base — governed.\"\"\"\n    return await kb.search(query)\n\n@agent.tool\n@govern(policy)\nasync def create_ticket(ctx, title: str, body: str) -> str:\n    \"\"\"Create support ticket — governed.\"\"\"\n    return await tickets.create(title=title, body=body)\n```\n\n### CrewAI\n\n```python\nfrom crewai import Agent, Task, Crew\n\npolicy = GovernancePolicy(\n    name=\"research-crew\",\n    allowed_tools=[\"search\", \"analyze\"],\n    max_calls_per_request=30\n)\n\n# Apply governance at the crew level\ndef governed_crew_run(crew: Crew, policy: GovernancePolicy):\n    \"\"\"Wrap crew execution with governance checks.\"\"\"\n    audit = AuditTrail()\n    for agent in crew.agents:\n        for tool in agent.tools:\n            original = tool.func\n            tool.func = govern(policy, audit_trail=audit)(original)\n    result = crew.kickoff()\n    return result, audit\n```\n\n### OpenAI Agents SDK\n\n```python\nfrom agents import Agent, function_tool\n\npolicy = GovernancePolicy(\n    name=\"coding-agent\",\n    allowed_tools=[\"read_file\", \"write_file\", \"run_tests\"],\n    blocked_tools=[\"shell_exec\"],\n    max_calls_per_request=50\n)\n\n@function_tool\n@govern(policy)\nasync def read_file(path: str) -> str:\n    \"\"\"Read file contents — governed.\"\"\"\n    import os\n    safe_path = os.path.realpath(path)\n    if not safe_path.startswith(os.path.realpath(\".\")):\n        raise ValueError(\"Path traversal blocked by governance\")\n    with open(safe_path) as f:\n        return f.read()\n```\n\n---\n\n## Governance Levels\n\nMatch governance strictness to risk level:\n\n| Level | Controls | Use Case |\n|-------|----------|----------|\n| **Open** | Audit only, no restrictions | Internal dev\u002Ftesting |\n| **Standard** | Tool allowlist + content filters | General production agents |\n| **Strict** | All controls + human approval for sensitive ops | Financial, healthcare, legal |\n| **Locked** | Allowlist only, no dynamic tools, full audit | Compliance-critical systems |\n\n---\n\n## Best Practices\n\n| Practice | Rationale |\n|----------|-----------|\n| **Policy as configuration** | Store policies in YAML\u002FJSON, not hardcoded — enables change without deploys |\n| **Most-restrictive-wins** | When composing policies, deny always overrides allow |\n| **Pre-flight intent check** | Classify intent *before* tool execution, not after |\n| **Trust decay** | Trust scores should decay over time — require ongoing good behavior |\n| **Append-only audit** | Never modify or delete audit entries — immutability enables compliance |\n| **Fail closed** | If governance check errors, deny the action rather than allowing it |\n| **Separate policy from logic** | Governance enforcement should be independent of agent business logic |\n\n---\n\n## Quick Start Checklist\n\n```markdown\n## Agent Governance Implementation Checklist\n\n### Setup\n- [ ] Define governance policy (allowed tools, blocked patterns, rate limits)\n- [ ] Choose governance level (open\u002Fstandard\u002Fstrict\u002Flocked)\n- [ ] Set up audit trail storage\n\n### Implementation\n- [ ] Add @govern decorator to all tool functions\n- [ ] Add intent classification to user input processing\n- [ ] Implement trust scoring for multi-agent interactions\n- [ ] Wire up audit trail export\n\n### Validation\n- [ ] Test that blocked tools are properly denied\n- [ ] Test that content filters catch sensitive patterns\n- [ ] Test rate limiting behavior\n- [ ] Verify audit trail captures all events\n- [ ] Test policy composition (most-restrictive-wins)\n```\n\n---\n\n## Related Resources\n\n- [Agent Governance Toolkit](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-governance-toolkit) — Full governance framework\n- [AgentMesh Integrations](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-governance-toolkit\u002Ftree\u002Fmain\u002Fpackages\u002Fagentmesh-integrations) — Framework-specific packages\n- [OWASP Top 10 for LLM Applications](https:\u002F\u002Fowasp.org\u002Fwww-project-top-10-for-large-language-model-applications\u002F)\n",{"name":5,"description":7},"main","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd","skills\u002Fagent-governance",5344,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-13 02:05:36",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add github\u002Fawesome-copilot --skill agent-governance",{"tool":71,"command":72},"bunx","bunx skills add github\u002Fawesome-copilot --skill agent-governance",{"tool":74,"command":75},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill agent-governance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fagent-governance\u002FSKILL.md",true,[79],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"agents\u002Fopenai.yaml","REFERENCE","参考文档",258,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fdbs-save\u002Fagents\u002Fopenai.yaml",[86,116,143,172,204,221],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":96,"publishedAt":50},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[92,95],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[97,98,99,100,101,26,102,103,104,105,106,107,108,109,110,111,112,113,114,115],"supabase","rls","supabase rls","supabase rls policies","project","review","change","read","write","security","isolation","tables","as","tests","prove","use","users","functions","with",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":50},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[122],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[124,125,40,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142],"distribution","skill distribution audit","SET","deterministic","installer","for","discovery","comparison","helper","manifest","version","collection","drift","output","investigate","duplicate","template","release","reconcile",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":147,"sourceHtmlUrl":148,"categories":149,"keywords":155,"publishedAt":50},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[150],{"categoryNo":151,"categoryName":152,"taxonomyType":153,"taxonomyTypeDesc":154},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[156,157,158,159,160,161,129,101,162,163,164,165,166,167,168,112,169,170,171,45],"custom","code","logicapps custom code net10 migration","migration","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","Legacy","debugging",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":176,"sourceHtmlUrl":177,"categories":178,"keywords":183,"publishedAt":50},"01M6AEBN37RQMXJ3298PEY7PG1","winmd-api-search","Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI\u002FML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FSKILL.md",[179,182],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":151,"categoryName":152,"taxonomyType":153,"taxonomyTypeDesc":154},[184,185,186,187,188,189,190,191,192,41,193,194,195,196,37,26,197,198,199,200,201,129,202,203],"winmd api search","search","api","windows","desktop","file access","enumeration","ui","ml","networking","capabilities","notifications","explore","features","full","camera","events","platform","methods","controls",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":208,"licenseFileUrl":209,"sourceHtmlUrl":210,"categories":211,"keywords":217,"publishedAt":50},"01M6AE571R3SC1ZGE202B3NB5S","resemble-detect","Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity, and analyze media intelligence using Resemble AI","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FSKILL.md",[212,213,216],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":214,"categoryName":215,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[218,126,41,219,220],"resemble detect","https","identity",{"skillNo":222,"name":223,"nameZh":6,"description":224,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":208,"licenseFileUrl":225,"sourceHtmlUrl":226,"categories":227,"keywords":232,"publishedAt":50},"01M6AE30BSK2HCY4TQQ22Z8JRD","quality-playbook","Run a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FSKILL.md",[228,231],{"categoryNo":229,"categoryName":230,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[233,234,235,236,157,102,9,40,237,238,219,239,240,241,242,243,244,245,246,247,248,249,110,250,251,252,253],"playbook","quality playbook","quality","code review","tdd","run","report","spec","bug report","council","engineering","functional","spec audit","bug","verified","multi-model","three","coverage","model","regression","structural"]