solo-sgr

solo-sgr is a skill for Claude Code from fortunto2/solo-factory. It costs 71 tokens per session (1,746 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. Also seen: built for openclaw.

Part of the solo plugin — 65 skills, 2 commands, 2 agents, 5 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 65 skills, 2 commands, 2 agents, 5 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,746 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.01746
Opus 5.5 $0.00028 $0.00698
Sonnet 5.5 $0.00014 $0.00349
Haiku 4.5 $0.00007 $0.00175

Measured 2mo ago against content hash f088c91331ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 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 · 180 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. 2mo ago Changed · +2 lines f088c91331ab
  2. 2mo 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 yesterday), licensed MIT. It adds 71 tokens to every session and 1,746 once invoked, about $0.0003 per session on Opus 5.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

solo-sgr compared with skills from other repositories

solo-sgr next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
solo-sgrfortunto2/solo-factorySkill18yesterdayMITA71Claude Code
diagnose-backend-bugQoderAI/better-harnessSkill2.5k9d agoMITA87Claude Code, Codex
openloomi-apimelandlabs/openloomiSkill1.0k1mo agoApache-2.0A106Claude Code
openloomi-connectorsmelandlabs/openloomiSkill1.0k1mo agoApache-2.0A113Claude Code
architectureromiluz13/cc10xSkill1671mo agoMITA56Claude Code
mcp-server-scaffoldjpantsjoha/ai-native-developer-experienceSkill1311d agoApache-2.0A53Claude Code
laravel-patternstranhieutt/software_development_departmentSkill746mo agoMITA49Claude Code