# Game Mod Balance Scaling

> Mod Balance Design & Scaling Index for Self-Made Mods — Production-grade evidence-backed analysis harness for game modding balance and scaling. Use this skill whenever the user asks about mod balance, scaling design, power curve analysis, economy consistency in mods, difficulty curves, mod compatibility, or needs to analyze/evaluate game mod balance decisions. This skill provides structured, evid…

- **Type:** Skill
- **Install:** `agentstack add skill-dungnotnull-game-mod-balance-scaling-agent-skill-game-mod-balance-scaling-agent-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [dungnotnull](https://agentstack.voostack.com/s/dungnotnull)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [dungnotnull](https://github.com/dungnotnull)
- **Source:** https://github.com/dungnotnull/game-mod-balance-scaling-agent-skill

## Install

```sh
agentstack add skill-dungnotnull-game-mod-balance-scaling-agent-skill-game-mod-balance-scaling-agent-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# SKILL.md — game-mod-balance-scaling Skill Registry

## Skill Registration

### Identity
- **Name:** `game-mod-balance-scaling`
- **Version:** 1.0.0
- **Type:** Harness (orchestrates multiple sub-skills)
- **Domain:** Modding Balance Engineering & Scaling
- **Phase:** Production Ready

### Description
Production-grade harness for analyzing game mod balance and scaling design. Provides evidence-backed analysis with academic citations, risk disclosure, and actionable recommendations. Orchestrates 5 specialized sub-skills through a structured workflow with quality gates and graceful degradation.

### Triggering Phrases
Use this skill when the user asks about:
- Mod balance analysis or evaluation
- Scaling design for game mods
- Power curve analysis or design
- Economy consistency in mods
- Difficulty curves and progression
- Mod compatibility and interactions
- Balance testing and telemetry
- Game mod balance decisions

## Architecture

### Flexible Agent & Skill Pattern

This skill uses a **modular skill-registry pattern** with:
- **Chain-of-thought routers:** Main harness routes inputs through specialized analysis steps
- **Specialized sub-agents:** Each sub-skill handles a specific domain task
- **Quality gate checkpoints:** Structured validation at each stage
- **Graceful degradation:** Fallback chains for missing data

### Harness Flow

```
USER INPUT
    │
    ▼
[Pre-Flight: Language Detection]
    │
    ├─► Step 1: sub-gather-requirements ──► Structured requirements
    ├─► Step 2: sub-evidence-collector ──► Evidence bundle
    ├─► Step 3: sub-core-analysis ──► Balance analysis
    ├─► Step 4: sub-knowledge-updater ──► Academic evidence
    ├─► Step 5: sub-advisor ──► Risk-disclosed conclusion
    │
    ▼
[Quality Gates: U1-U6, G1-G4]
    │
    ▼
DELIVER OUTPUT
```

### Sub-Skill Registry

| Sub-Skill | Purpose | Trigger | Quality Gate |
|-----------|---------|---------|--------------|
| `sub-gather-requirements` | Clarify analysis scope | Always first | Object confirmed |
| `sub-evidence-collector` | Fetch authoritative data | After requirements | ≥1 current + 1 authoritative source |
| `sub-core-analysis` | Balance design analysis | After evidence | Functions explicit, balanced |
| `sub-knowledge-updater` | Query academic evidence | After analysis | ≥1 academic source |
| `sub-advisor` | Synthesize recommendation | After knowledge | Valid verdict + disclosure |

## Tool Definitions

### Tool Schema

```json
{
  "tool_name": "WebSearch",
  "purpose": "Fetch live domain news and reports",
  "parameters": {
    "query": {
      "type": "string",
      "required": true,
      "description": "Search query for domain information"
    },
    "recency_filter": {
      "type": "string",
      "enum": ["oneDay", "oneWeek", "oneMonth", "noLimit"],
      "default": "oneMonth"
    }
  },
  "output": {
    "results": "Array of search results with title, URL, summary",
    "timestamp": "ISO format timestamp"
  }
}
```

### Tool Execution Handlers

All tools are invoked with:
- **Timeout protection:** 30-second default timeout
- **Retry logic:** 3 attempts with exponential backoff
- **Fallback chains:** Primary → Secondary → Knowledge base
- **Error handling:** Graceful degradation on failure

## Input/Output JSON Schemas

### Input Schema

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "user_message": {
      "type": "string",
      "description": "User's analysis request"
    },
    "language": {
      "type": "string",
      "enum": ["en", "vi", "auto"],
      "default": "auto"
    },
    "analysis_type": {
      "type": "string",
      "enum": ["combined", "economy", "power_curve", "difficulty"],
      "default": "combined"
    },
    "mod_data": {
      "type": "object",
      "description": "Optional mod configuration data",
      "properties": {
        "name": {"type": "string"},
        "version": {"type": "string"},
        "target_game": {"type": "string"},
        "scope": {
          "type": "object",
          "properties": {
            "items": {"type": "boolean"},
            "stats": {"type": "boolean"},
            "economy": {"type": "boolean"},
            "difficulty": {"type": "boolean"}
          }
        }
      }
    }
  },
  "required": ["user_message"]
}
```

### Output Schema

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "report": {
      "type": "object",
      "properties": {
        "title": {"type": "string"},
        "date": {"type": "string", "format": "date"},
        "language": {"type": "string"},
        "executive_summary": {"type": "string"},
        "inputs_and_scope": {"type": "object"},
        "evidence_collected": {"type": "array"},
        "analysis": {"type": "object"},
        "scenarios": {"type": "object"},
        "academic_evidence": {"type": "array"},
        "disclosure": {"type": "string"},
        "verdict": {
          "type": "string",
          "enum": ["Balanced Mod", "Conditional", "Unbalanced", "Inconclusive"]
        },
        "key_risks": {"type": "array"},
        "evidence_chain": {"type": "array"},
        "remediation": {"type": "array"}
      },
      "required": ["title", "date", "executive_summary", "verdict", "disclosure"]
    },
    "metadata": {
      "type": "object",
      "properties": {
        "session_id": {"type": "string"},
        "gates_passed": {"type": "array"},
        "gates_failed": {"type": "array"},
        "degradation_level": {"type": "integer", "minimum": 0, "maximum": 4},
        "confidence": {"type": "string", "enum": ["HIGH", "MEDIUM", "LOW"]}
      }
    }
  },
  "required": ["report", "metadata"]
}
```

## Validation & Execution

### Skill Resolution

When invoked, the skill:
1. **Loads configuration** from `/config/settings.json`
2. **Initializes hooks** from `/config/hooks.json`
3. **Detects language** from input characters
4. **Validates inputs** against schema
5. **Routes through harness** steps sequentially

### Execution Protocol

Each step:
1. **Pre-hooks:** Validate inputs, check degradation
2. **Execute sub-skill:** Invoke via Skill tool
3. **Post-hooks:** Update state, log metrics
4. **Quality gate:** Verify output meets requirements
5. **Auto-fix:** Attempt correction on failure (2 retries max)
6. **Escalate:** Degrade on persistent failure

### Error Handling

| Error Type | Detection | Recovery | Limit |
|------------|-----------|----------|-------|
| Source timeout | No response 30s | Retry alternate source | 3 |
| Invalid input | Schema mismatch | Ask user to confirm | 2 |
| Missing input | Field absent | Proceed with available + flag | N/A |
| Knowledge miss | No matches | WebSearch gap-fill | 2 |
| Gate failure | Validation fails | Auto-fix → degrade | 2 retries |

## Quality Gates

### Universal Gates (U1-U6)

All outputs must pass:
- **U1:** ≥3 sources cited, ≥1 academic/authoritative
- **U2:** Disclosure/limitations before recommendation
- **U3:** Evidence hierarchy stated per source
- **U4:** Language matches user preference
- **U5:** Output uses declared template
- **U6:** Every claim traceable to source or flagged

### Domain Gates (G1-G4)

Mod-specific requirements:
- **G1:** Scaling functions explicit (linear/poly/log)
- **G2:** Power/economy curve balanced
- **G3:** Difficulty vs vanilla addressed
- **G4:** Compatibility/interactions checked

### Gate Enforcement

```python
enforcement_protocol = {
    "on_failure": "run_auto_fix",
    "max_retries": 2,
    "on_persistent_failure": "emit_limitation_notice",
    "continue": True  # Don't block entire output
}
```

## Graceful Degradation

### Degradation Levels

| Level | Condition | Behavior |
|-------|-----------|----------|
| 0 | All sources reachable | Full analysis |
| 1 | Some primary fail | Use secondary + flag substitutions |
| 2 | Most live fail | Knowledge base only + "historical" flag |
| 3 | Variables missing | Proceed with available + "UNAVAILABLE" marks |
| 4 | Complete failure | Emit notice, don't fabricate |

### Limitation Banner

```markdown
---
⚠️ LIMITATION NOTICE
This output was generated with reduced data availability (Level [0-4]).
Cross-check with current data before acting. Substituted/missing sources flagged inline.
---
```

## Performance Optimization

### Context Window Management

- **Max tokens:** 100,000 (configurable)
- **Compression:** Remove redundant context
- **Caching:** Cache knowledge base queries (1 hour TTL)
- **Lazy loading:** Load references only when needed

### Token Optimization

- **Summarization:** Compress intermediate outputs
- **Selective citation:** Include only most relevant sources
- **Template compression:** Use compact output formats
- **State pruning:** Drop non-essential state data

## Logging & Monitoring

### Structured Logging

All events logged as JSON:
```json
{
  "timestamp": "ISO-8601",
  "level": "INFO|WARNING|ERROR",
  "session_id": "string",
  "event": "hook_name|step_name",
  "data": {},
  "duration_ms": 0.0
}
```

### Metrics Tracked

- Step execution times
- Gate pass/fail rates
- Degradation level changes
- Source availability
- Token consumption

## Configuration

### Required Files

- `/config/settings.json` - Main configuration
- `/config/hooks.json` - Hooks configuration
- `/references/domain_knowledge.md` - Domain references
- `/references/balance_formulas.md` - Mathematical formulas
- `/SECOND-KNOWLEDGE-BRAIN.md` - Living knowledge base

### Environment Variables

Override config with:
```bash
export GAME_MOD_LOG_LEVEL=DEBUG
export GAME_MOD_MAX_WORKERS=8
export GAME_MOD_CACHE_TTL=7200
```

## Dependencies

### Required Tools

- `WebSearch` - Live data fetching
- `WebFetch` - Document retrieval
- `Read` - File reading
- `Write` - Knowledge base updates
- `Bash` - Script execution
- `Skill` - Sub-skill invocation

### Optional Python Packages

```python
requests>=2.28.0      # HTTP client
feedparser>=6.0.0     # RSS parsing
python-dateutil>=2.8.0  # Date parsing
```

## Installation & Usage

### Skill Installation

```bash
# Copy skill directory to Claude skills path
cp -r game-mod-balance-scaling ~/.claude/skills/

# Or install via package manager (if available)
claude skill install game-mod-balance-scaling
```

### Basic Usage

```
User: Analyze the balance scaling for my weapon damage mod

[Skill activates → runs through harness → delivers report]

User: Can you check the economy consistency of this crafting mod?

[Skill activates → focuses on economy analysis → delivers report]
```

## Testing & Validation

### Test Scenarios

See `/tests/test-scenarios.md` for:
1. Standard analysis
2. Minimal input handling
3. Comparison scenarios
4. Risk/conflict detection
5. Degraded mode operation

### Validation

Run project validation:
```bash
python scripts/validation.py --full
```

## Maintenance

### Knowledge Updates

Automatic via cron:
```cron
# Weekly academic update (Mondays 8:00 AM)
0 8 * * 1 python tools/knowledge_updater.py

# Daily news update (Daily 7:00 AM)
0 7 * * * python tools/knowledge_updater.py --news-only
```

### Configuration Updates

1. Edit `/config/settings.json`
2. Run validation: `python scripts/validation.py --config`
3. Restart skill session

## License & Attribution

**License:** MIT
**Author:** 972026 Skill Library
**Version:** 1.0.0
**Last Updated:** 2026-07-28

## References

- Project documentation: `/PROJECT-detail.md`
- Development tracking: `/PROJECT-DEVELOPMENT-PHASE-TRACKING.md`
- Harness standard: `/D:/972026/SKILL-STANDARD.md`
- Reference implementation: `/D:/vn-finance-analysis-hd-skill/`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [dungnotnull](https://github.com/dungnotnull)
- **Source:** [dungnotnull/game-mod-balance-scaling-agent-skill](https://github.com/dungnotnull/game-mod-balance-scaling-agent-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dungnotnull-game-mod-balance-scaling-agent-skill-game-mod-balance-scaling-agent-skill
- Seller: https://agentstack.voostack.com/s/dungnotnull
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
