Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    AI Agent Decision Logic Builder – Decision Tree & Workflow

    1

    Convert business requirements and policies into explicit, testable decision logic and flowcharts for AI agents.

    $23.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    AI Agent Decision Logic Builder – Decision Tree & Workflow

    AI Agent Decision Logic Builder – Decision Tree & Workflow

    Example session with this skill installed

    Design a decision tree for a refund agent. Customers get full refunds if the item is damaged and reported within 30 days. Late reports need manager approval. High-value items over $500 always need approval.

    • Read your context and instructions
    • Compiled the ai agent decision

    I have converted your refund policy into a structured decision architecture.

    AI Agent Decision Logic: Refund Processing

    1. Input Catalogue

    FieldTypeRequiredValidationMissing Data Handling
    item_conditionEnumYes{DAMAGED, DEFECTIVE, WRONG_ITEM, UNWANTED}Fail to escalation
    report_daysIntegerYes>= 0Assume > 30 (Escalate)
    item_valueDecimalYes> 0.00Assume > 500 (Escalate)

    2. Business Rule Catalogue

    R1 (Auto-Refund): If item_condition IS DAMAGED AND report_days <= 30 AND item_value <= 500 -> Outcome: AUTO_APPROVE.

    • R2 (Late Report): If item_condition IS DAMAGED AND report_days > 30 -> Outcome: MANAGER_REVIEW.
    • R3 (High Value): If item_value > 500 -> Outcome: MANAGER_REVIEW (Priority Overwrite).
    • R4 (Default): If no conditions match -> Outcome: DENY_AND_ESCALATE.

    3. Implementation Specification (Pseudocode)

    def evaluate_refund(request):
        # R3: High Value Check (Override)
        if request.item_value > 500:
            return {"action": "ESCALATE", "reason": "HIGH_VALUE_THRESHOLD"}
        
        # R1 & R2: Damage Assessment
        if request.item_condition == "DAMAGED":
            if request.report_days <= 30:
                return {"action": "APPROVE", "reason": "STANDARD_DAMAGED_POLICY"}
            else:
                return {"action": "ESCALATE", "reason": "LATE_REPORT_APPROVAL"}
                
        # R4: Fallback
        return {"action": "DENY", "reason": "OUTSIDE_POLICY_SCOPE"}
    

    4. Test Scenarios

    • Scenario A (Happy Path): Damaged, 10 days, $45. Expected: APPROVE.
    • Scenario B (Threshold): Damaged, 10 days, $501. Expected: ESCALATE.
    • Scenario C (Late): Damaged, 45 days, $50. Expected: ESCALATE.
    • Scenario D (Unknown Value): Damaged, 10 days, NULL. Expected: ESCALATE.

    Next steps

    1. Define the specific "Manager Review" queue destination for escalated cases.
    2. Confirm if "Defective" or "Wrong Item" should follow the "Damaged" branch.
    3. Integrate the pseudocode logic into your agent's routing tool.

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

    About this skill

    AI agents often fail because their decision logic is buried in vague natural-language prompts. This makes them unpredictable, hard to debug, and prone to "hallucinating" business policies when they hit a blank spot. If your workflows break when data is missing or rules overlap, you need a structured logic specification.

    This skill converts messy business requirements, policies, and user stories into implementation-ready decision architectures. It forces you to define exactly how an agent should handle every branch, from valid inputs to edge-case failures. It replaces "when appropriate" with testable predicates, ensuring your agents act as reliable extensions of your business logic.

    What it does

    • Rule normalization translates plain-language policies into structured, testable predicates with defined operators.
    • Input cataloging defines field types, validation rules, and specific behaviors for null or malformed data.
    • Conflict resolution identifies overlapping or contradictory rules and applies explicit priority policies.
    • Fallback design maps out escalation paths, safe default outcomes, and human-in-the-loop approval gates.
    • Implementation specs generates framework-neutral pseudocode, Mermaid flowcharts, and JSON-style rule objects.

    How it works

    1. Intake requirements by providing existing prompts, policy docs, or workflow notes to the agent.
    2. Review the extraction of decision boundaries, input fields, and potential rule conflicts identified by the skill.
    3. Refine thresholds by answering specific questions about missing data behaviors or priority overrides.
    4. Export specifications in your preferred format, such as a full logic architecture or a concise decision tree.

    Frameworks & tools

    This skill produces framework-neutral logic applicable to LangGraph, CrewAI, PydanticAI, or custom Python/TypeScript orchestration layers. It uses Mermaid.js for diagrams and standard JSON for rule schemas.

    Why this beats prompting it yourself

    Writing "be logical" in a system prompt results in inconsistent behavior. This skill uses a systematic intake process to catch logical gaps, unreachable branches, and silent failures that standard prompting misses. It ensures every decision point has a defined outcome and a recovery path.

    Use cases

    • Customer Support Triage to route tickets based on sentiment, account tier, and specific keyword triggers.
    • Financial Processing for building loan or credit approval trees with strict regulatory boundaries.
    • Content Moderation to define explicit "keep" or "delete" logic based on evolving community guidelines.
    • DevOps Automation for determining when to auto-remediate infrastructure alerts versus escalating to on-call.

    Known limitations

    This skill designs logic and does not execute code or verify production correctness. It requires the user to provide specific business thresholds and cannot invent legal or medical policies.

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

    Does not execute workflows. Requires user-defined thresholds for business-critical values. Cannot verify legal or regulatory compliance of provided rules.

    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 17 days ago

    Permissions

    No special permissions declared or detected

    Listed17 days ago

    What's inside

    Frequently Asked Questions

    This skill transforms ambiguous natural-language policies into structured decision architectures, preventing AI hallucinations by defining exact logic branches and fallback paths for every scenario.

    Yes, the logic specifications are generated in framework-neutral formats like JSON and Mermaid.js, making them compatible with LangGraph, CrewAI, PydanticAI, and custom Python/TypeScript setups.

    This skill provides a structured intake and export process to design logic; it does not require complex installation, but it does require you to provide your existing policy documents or workflow notes for the conversion process.

    You receive a complete logic architecture including normalized rule sets, an input data catalog with validation rules, conflict resolution policies, and implementation-ready pseudocode and flowcharts.

    Unlike general prompting, this skill uses a systematic extraction process to identify 'silent failures,' unreachable branches, and contradictory rules that standard AI prompts often overlook.

    New in Agents & Orchestration