solo-sgr

solo-sgr is a skill for Claude Code from fortunto2/solo-factory. It costs 71 tokens per session (1,733 once invoked), scanned A, original, MIT.

A schema-design workflow for agent systems and APIs. A schema is a defined shape for structured data, such as the fields an AI response must contain.

In plain words
What is it for?
Use it to design structured output, Pydantic schemas, agent loops, constrained decoding, and tool-dispatch pipelines.
Why use it?
It helps turn loosely written AI output and tool calls into predictable, validated structures.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the solo plugin — 45 skills, 2 commands, 3 agents, 3 hooks shipped together

Good fit Use it to design structured output, Pydantic schemas, agent loops, constrained decoding, and tool-dispatch pipelines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fortunto2/solo-factory/sgr
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fortunto2/solo-factory --skill sgr
Clone the repo
git clone --depth 1 https://github.com/fortunto2/solo-factory

Made for: Claude Code.

Or install solo, the plugin that ships this one along with the rest of its 45 skills, 2 commands, 3 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for solo-sgr

README.md
[![agentmods](https://agentmods.dev/badge/skills/fortunto2/solo-factory/sgr/github.svg)](https://agentmods.dev/skills/fortunto2/solo-factory/sgr)
Your own site
<a href="https://agentmods.dev/skills/fortunto2/solo-factory/sgr"><img src="https://agentmods.dev/badge/skills/fortunto2/solo-factory/sgr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for solo-sgr

Your own site · 80×15
<a href="https://agentmods.dev/skills/fortunto2/solo-factory/sgr"><img src="https://agentmods.dev/badge/skills/fortunto2/solo-factory/sgr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01733
Opus 5 $0.00036 $0.00866
Sonnet 5 $0.00014 $0.00347
Haiku 4.5 $0.00007 $0.00173

Measured 9d ago against content hash 503378d722e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

solo-sgr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (references/sgr-demo.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/sgr/SKILL.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/sgr

Design and implement Schema-Guided Reasoning (SGR) pipelines. Translate domain expert mental checklists into structured reasoning schemas for LLMs.

Source: Rinat Abdullin — Schema-Guided Reasoning

Core Principle

SGR = guide LLM reasoning through predefined steps via constrained decoding. Instead of free-form text → enforce a schema that defines what steps, in which order, where to focus attention.

Domain expert mental checklist → Pydantic/Zod schema → Constrained decoding → Deterministic dispatch

When to Use

  • Designing agent tool dispatch (NextStep pattern)
  • Building structured analysis pipelines (compliance, code review, evaluation)
  • Replacing prompt chains with single structured call
  • Any place where LLM output must be parseable and actionable

Steps

  1. Parse task from $ARGUMENTS:

    • If "audit": scan project for existing Pydantic/Zod schemas, evaluate against SGR patterns
    • If task description: design SGR pipeline from scratch
    • If empty: ask "What domain/task should the SGR pipeline handle?"
  2. Identify the reasoning cascade — interview the domain:

    • What decisions does a human expert make? In what order?
    • What information does each step need from previous steps?
    • Where does the expert need to "look before deciding"?
    • What are the possible actions at the end?

    This is the critical step. SGR quality = how well you translate the expert's mental checklist.

  3. Design the schema following SGR patterns:

    The NextStep Pattern (agent loop)

    class NextStep(BaseModel):
        current_state: str                    # thinking space
        plan_remaining_steps: list[str]       # 1-5 steps, only first used
        task_completed: bool                  # routing gate
        function: Union[Tool1, Tool2, ..., ReportCompletion] = Field(
            ..., description="execute first remaining step"
        )
    

    The Analysis Cascade Pattern (single-shot)

    class Analysis(BaseModel):
        preliminary: str                      # initial assessment
        classification: Literal["a", "b", "c"]  # force categorization
        evidence: list[str]                   # cite sources
        gaps: list[GapItem]                   # structured findings
        verdict: Literal["pass", "partial", "fail"]  # final decision
        reasoning_for_verdict: str            # explain after deciding
    

Read the full file on GitHub · 178 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 178 lines · 71 tokens per session scan A 503378d722e7

Subscribe to this mod's changes

solo-sgr is a skill published in the GitHub repository fortunto2/solo-factory (18 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 1,733 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

python-sdk

Implement or modify Python SDK behavior under python/composio, including tools, toolkits, sessions, auth configs, connected accounts, client integration, and shared Python models. Use for Python core runtime/API work; pair with python-testing and cross-sdk-parity when TypeScript must match.

ComposioHQ/composio · 60 tokens

potpie-infra-architecture

Use for project infra and architecture context: environments, adapters, runtime configuration, deployments, service dependencies, datastores, API contracts, ownership, incidents, and dependency blast radius.

potpie-ai/potpie · 43 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

openloomi-api

OpenLoomi ships a local-first HTTP API served from the desktop app (port 3414, fallback 3515). All auth, Memory, AI, RAG, Loop, and Audit data live in a local SQLite database — your data stays on your machine and the OpenLoomi app is the source of truth. The only externally-routed auth path is the Composio OAuth…

melandlabs/openloomi · 106 tokens

memstack-automation-webhook-designer

Use this skill when the user says 'webhook', 'webhook handler', 'webhook endpoint', 'receive events', 'HMAC verification', 'idempotency', or needs secure webhook handlers with signature verification, retry handling, and dead letter queues. Do NOT use for full n8n workflows or scheduled tasks.

cwinvestments/memstack · 74 tokens

telegram

Owner-only Telegram text bridge and Mini App gateway for the existing Ouroboros interface.

razzant/ouroboros · 19 tokens