agentleFS
dungnotnulldungnotnull/standalone-solar-deep-station-agent-skill/config/SKILL.md

config

Skill5 starsChanged 4 months agoMITView on GitHub

The standalone-solar-deep-station skill uses a modular, registry-based architecture that enables dynamic skill resolution, chain-of-thought routing, and graceful fallback. This document explains how skills are registered, resolved, executed, and validated. Skills are registered through the SkillRegistry class: Every skill must provide: When a query arrives, the registry:

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use uninstall, status and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    uninstall

    Uninstall a community skill that was installed via the hub. Confirms before deleting files, refuses to touch first-party plugin skills, and logs every action. Use when the user wants to fully remove a community skill ("uninstall [skill]", "remove this skill") rather than just disable it.

    Also in 3 projects that use this

  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 4 projects that use this

  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 14 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every skill must provide:

    line 64
  2. Distinctive:

    When a query arrives, the registry:

    line 124
  3. Distinctive:

    Fallback Chain: If no match, tries lower tiers recursively

    line 129
  4. Distinctive:

    All schemas use JSON Schema draft-07:

    line 245
  5. Distinctive:

    Schema Validation: Always validate inputs/outputs against schemas

    line 371
  6. Distinctive:

    Error Handling: Use specific error types, not generic exceptions

    line 372
  7. Distinctive:

    Documentation: Document all assumptions and limitations

    line 373
  8. Distinctive:

    Testing: Test with various intents and domain tiers

    line 374
  9. Very specific:

    Use Orchestrator: Prefer orchestrator.execute() over direct skill calls

    line 378
  10. Very specific:

    Handle Degradation: Always check data_availability_level in results

    line 379
  11. Distinctive:

    Quality Gates: Don't skip gates; use auto-fix or flag limitations

    line 380
  12. Distinctive:

    Language Support: Always detect and respect language preference

    line 381
  13. Distinctive:

    Logging: Use execution log for debugging and metrics

    line 382
  14. Distinctive:

    Create skill metadata following the schema

    line 390
  15. Distinctive:

    Test with various intents and tiers

    line 393
  16. Very specific:

    Add to IntentType enum in agent_registry.py

    line 397
  17. Very specific:

    Add patterns to IntentRouter.PATTERNS

    line 398
  18. Very specific:

    Add to DomainTier enum

    line 403
  19. Distinctive:

    Update tier detection logic

    line 404
  20. Very specific:

    All schemas are available in config/skill_schemas.py:

    line 411

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SKILL.md — Skill Registry Documentation

Overview

The standalone-solar-deep-station skill uses a modular, registry-based architecture that enables dynamic skill resolution, chain-of-thought routing, and graceful fallback. This document explains how skills are registered, resolved, executed, and validated.


Architecture Overview

User Query
    │
    ▼
[Intent Router] → Detect Intent + Domain Tier
    │
    ▼
[Skill Registry] → Resolve Best Agent
    │
    ▼
[Agent Execution] → Pre-Hooks → Execute → Post-Hooks
    │
    ▼
[Quality Gates] → Validate → Auto-Fix → Fallback
    │
    ▼
[Output] → Result with Metadata

Skill Registration

Registration Process

Skills are registered through the SkillRegistry class:

from config.agent_registry import get_registry, BaseAgent, SkillMetadata

# Create agent metadata
metadata = SkillMetadata(
    name="sub-core-analysis",
    version="1.0.0",
    description="Design standalone solar system for remote station",
    author="standalone-solar-deep-station",
    intent_types=[IntentType.ANALYSIS, IntentType.VALIDATION],
    domain_tiers=[DomainTier.INTERMEDIATE, DomainTier.ADVANCED, DomainTier.EXPERT],
    input_schema=get_schema("CoreAnalysisInput"),
    output_schema=get_schema("CoreAnalysisOutput"),
    dependencies=["sub-evidence-collector"],
    requires_tools=["WebFetch", "Read", "Arithmetic"],
    quality_gates=["G1", "G2", "G3", "G4"],
    tags=["solar", "pv-sizing", "battery"]
)

# Register the agent
registry = get_registry()
registry.register(agent_instance)

Metadata Requirements

Every skill must provide:

FieldTypeRequiredDescription
namestring✓Unique skill identifier (kebab-case)
versionstring✓Semantic version
descriptionstring✓One-line summary (used in triggering)
authorstring✓Author or system identifier
intent_typeslist✓Supported intents (see IntentType enum)
domain_tierslist✓Supported complexity levels
input_schemadict✓JSON Schema draft-07 for input validation
output_schemadict✓JSON Schema draft-07 for output validation
dependencieslist✗Skills that must run first
requires_toolslist✗Tools required for execution
quality_gateslist✗Quality gates to apply
tagslist✗Search/metadata tags

Intent Routing

Intent Types

IntentDescriptionExample Queries
ANALYSISFull system analysis"Analyze my solar system", "Design a 5kW system"
COMPARISONCompare options"Compare lithium vs lead acid", "Generator vs fuel cell"
FEASIBILITYAssess feasibility"Is this feasible?", "Can this work at my site?"
OPTIMIZATIONOptimize existing"Optimize efficiency", "Reduce costs"
TROUBLESHOOTINGDiagnose issues"Why is my system failing?", "Diagnose low output"
EDUCATIONExplain concepts"Explain MPPT", "How does autonomy work?"
VALIDATIONValidate designs"Check if my design is valid", "Verify this system"

Domain Tiers

TierComplexityExample Scenarios
BASICSimple load calc"What size battery for 100W?"
INTERMEDIATEStandard design"Design system for 2kW load"
ADVANCEDMulti-source + backup"Design with generator backup"
EXPERTGrid-interactive, hybrid"Grid-tied with battery backup"

Routing Logic

# Intent detection uses pattern matching
intent = router.detect_intent("Analyze my solar system")
# Returns: IntentType.ANALYSIS

# Tier detection uses keyword analysis
tier = router.detect_domain_tier("Design hybrid grid-interactive system")
# Returns: DomainTier.EXPERT

Skill Resolution

Resolution Algorithm

When a query arrives, the registry:

  1. Filters by Intent: Finds skills supporting the detected intent
  2. Filters by Tier: From above, finds skills supporting the detected tier
  3. Selects Best Match: Returns first candidate or most specific by tags
  4. Fallback Chain: If no match, tries lower tiers recursively
# Automatic resolution
agent = registry.resolve(intent=IntentType.ANALYSIS, tier=DomainTier.ADVANCED)
# Returns: sub-core-analysis agent (supports ANALYSIS + ADVANCED)

# Fallback example
agent = registry.resolve(intent=IntentType.ANALYSIS, tier=DomainTier.EXPERT)
# If no EXPERT agent, falls back to ADVANCED, then INTERMEDIATE

Manual Selection

Skills can be invoked directly by name:

agent = registry.get_skill("sub-core-analysis")
if agent:
    result = await agent.execute(context)

Execution Flow

Lifecycle Hooks

Agents support lifecycle hooks for extensibility:

agent = registry.get_skill("sub-core-analysis")

# Register hooks
agent.register_hook("pre_execution", log_context)
agent.register_hook("post_execution", validate_result)
agent.register_hook("on_error", handle_error)
agent.register_hook("on_quality_gate_fail", auto_fix)
HookPurposeWhen Called
pre_executionInput validation, loggingBefore agent.execute()
post_executionOutput validation, metricsAfter successful execution
on_errorError handling, recoveryOn exception
on_quality_gate_failAuto-fix, fallbackWhen quality gate fails

Execution Example

orchestrator = get_orchestrator()

# Execute query
result = await orchestrator.execute(
    user_query="Design a 5kW system with 3 days autonomy",
    language="en"
)

# Result structure
result.success        # bool
result.data           # dict (matches output schema)
result.errors         # list[str]
result.warnings       # list[str]
result.metadata       # dict (execution info)
result.execution_time_ms  # int
result.tokens_used    # int

Quality Gates

Universal Gates (U1-U6)

Apply to all skills:

GateCheckAuto-Fix
U1≥3 sources, ≥1 authoritativeFetch from KB/evidence collector
U2Disclosure before recommendationPrepend disclosure
U3Evidence tier labelsAnnotate sources
U4Language matches preferenceTranslate output
U5Template completenessReformat to template
U6Claims traceable to sourcesFlag unsupported claims

Domain Gates (G1-G4)

Apply to solar engineering skills:

GateCheckAuto-Fix
G1Load & autonomy definedCalculate from defaults
G2PV & battery sized with lossesAdd derating factors
G3Controller/inverter specifiedAdd MPPT controller
G4Backup & redundancyAdd backup recommendation

Enforcement Logic

# Automatic enforcement with retry
for gate in quality_gates:
    for attempt in range(max_retries):
        if not gate.check(result):
            if gate.can_auto_fix():
                result = gate.auto_fix(result)
            else:
                result.limitations.append(f"Gate {gate.name} failed")
                break

Input/Output Schemas

Schema Definition

All schemas use JSON Schema draft-07:

from config.skill_schemas import get_schema

# Get schema for validation
input_schema = get_schema("CoreAnalysisInput")
output_schema = get_schema("CoreAnalysisOutput")

# Validate input
is_valid, errors = validate_against_schema(input_data, input_schema)

Available Schemas

Schema NamePurpose
GatherRequirementsInputRequirements gathering input
GatherRequirementsOutputStructured requirements
EvidenceCollectorInputEvidence collection input
EvidenceCollectorOutputEvidence bundle
CoreAnalysisInputCore analysis input
CoreAnalysisOutputAnalysis results
KnowledgeUpdaterInputKB query input
KnowledgeUpdaterOutputAcademic evidence
AdvisorInputSynthesis input
AdvisorOutputFinal recommendation
MainHarnessOutputComplete report

Fallback & Degradation

Degradation Levels

LevelConditionBehavior
0All sources availableFull analysis
1Some primary failUse secondary + flag substitutions
2Most failKB only + "historical as of [date]"
3Input missingProceed + flag "DATA UNAVAILABLE"
4All fail + KB emptyEmit "DATA UNAVAILABLE", no fabrication

Fallback Chain

# Automatic fallback in skill resolution
def resolve_with_fallback(intent, tier):
    for fallback_tier in get_fallback_tiers(tier):
        agent = find_agent(intent, fallback_tier)
        if agent:
            return agent
    return None

Error Handling

Error Types

ErrorDetectionRecovery
Source timeoutNo response 30sRetry alternate source (max 3)
Invalid inputSchema mismatchAsk user to confirm
Missing inputField absentProceed + flag
Stale dataTimestamp oldFlag + request refresh
KB missNo matchesWebSearch gap-fill
Conflicting actionsMutually exclusiveApply precedence

Error Recovery Example

try:
    result = await agent.execute(context)
except ValidationError as e:
    # Ask user for clarification
    return request_clarification(e.missing_fields)
except SourceTimeoutError as e:
    # Try fallback source
    return execute_with_fallback(context)

Skill Discovery

List Available Skills

registry = get_registry()

# All skills
all_skills = registry.list_skills()

# Filter by intent
analysis_skills = registry.list_skills(intent=IntentType.ANALYSIS)

# Get skill metadata
agent = registry.get_skill("sub-core-analysis")
metadata = agent.metadata

Skill Metadata Query

# Get metadata for a skill
metadata = agent.metadata

print(f"Name: {metadata.name}")
print(f"Version: {metadata.version}")
print(f"Description: {metadata.description}")
print(f"Intents: {[i.value for i in metadata.intent_types]}")
print(f"Tiers: {[t.value for t in metadata.domain_tiers]}")
print(f"Dependencies: {metadata.dependencies}")
print(f"Quality Gates: {metadata.quality_gates}")
print(f"Tags: {metadata.tags}")

Best Practices

For Skill Authors

  1. Clear Descriptions: Make skill descriptions "pushy" to ensure triggering
  2. Schema Validation: Always validate inputs/outputs against schemas
  3. Error Handling: Use specific error types, not generic exceptions
  4. Documentation: Document all assumptions and limitations
  5. Testing: Test with various intents and domain tiers

For Integration

  1. Use Orchestrator: Prefer orchestrator.execute() over direct skill calls
  2. Handle Degradation: Always check data_availability_level in results
  3. Quality Gates: Don't skip gates; use auto-fix or flag limitations
  4. Language Support: Always detect and respect language preference
  5. Logging: Use execution log for debugging and metrics

Extending the Registry

Adding New Skills

  1. Create skill metadata following the schema
  2. Implement BaseAgent with validate/execute methods
  3. Register with registry.register(agent)
  4. Test with various intents and tiers

Adding New Intents

  1. Add to IntentType enum in agent_registry.py
  2. Add patterns to IntentRouter.PATTERNS
  3. Update documentation

Adding New Domain Tiers

  1. Add to DomainTier enum
  2. Update tier detection logic
  3. Document complexity differences

JSON Schema Reference

All schemas are available in config/skill_schemas.py:

from config.skill_schemas import list_schemas, get_schema

# List all schemas
schemas = list_schemas()

# Get specific schema
schema = get_schema("MainHarnessOutput")

Schemas are exported as JSON for documentation:

python -m config.skill_schemas
# Exports to schemas_export.json

Configuration

Skill behavior is configured via config/settings.json:

SectionKeyPurpose
llmtemperatureLLM temperature for skill execution
domainmax_autonomy_daysMaximum autonomy days for design
quality_gatesstrict_modeWhether to enforce all gates strictly
featuresenable_degraded_modeEnable degraded mode fallback

Environment variable overrides use SOLAR_STATION_ prefix:

export SOLAR_STATION_LLM_TEMPERATURE=0.5
export SOLAR_STATION_DOMAIN_MAX_AUTONOMY_DAYS=14
export SOLAR_STATION_DEBUG=true

Metrics and Monitoring

Execution Metrics

The orchestrator tracks:

  • Execution time per skill
  • Tokens used per invocation
  • Success/failure rates
  • Quality gate pass/fail rates
  • Degradation level frequency

Access Metrics

orchestrator = get_orchestrator()
log = orchestrator.get_execution_log()

# Analyze performance
for entry in log:
    print(f"{entry['skill']}: {entry['execution_time_ms']}ms")

Troubleshooting

Common Issues

IssueCauseSolution
Skill not triggeredDescription not pushy enoughAdd "use this skill whenever..."
No agent foundIntent/tier mismatchCheck intent patterns and tier support
Validation failsSchema mismatchCheck input/output against schemas
Quality gate failsMissing sources/disclosureEnable auto-fix in config
Degraded mode activeSources unreachableCheck network and source availability

References

  • config/agent_registry.py — Core registry implementation
  • config/skill_schemas.py — All JSON schemas
  • config/__init__.py — Configuration management
  • SKILL-STANDARD.md — Library-wide skill standard

Version: 1.0.0 Last Updated: 2026-07-15 Maintainer: standalone-solar-deep-station project

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.