Install
$ agentstack add skill-dungnotnull-healthy-microtransaction-economy-agent-skill-healthy-microtransaction-economy-agent-skill ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Healthy Microtransaction Economy Design (Ethical Monetization)
Overview
This is a professional-grade harness skill for Ethical Game Monetization & Microtransaction Design. It transforms Claude into a domain expert that delivers structured, evidence-backed outputs through a flexible, modular architecture.
Quick Start
# Invoke the skill
/healthy-microtransaction-economy Analyze the monetization ethics of [game/mechanic]
# Direct invocation
/healthy-microtransaction-economy Design ethical monetization for an idle mobile game targeting casual players
Flexible Agent/Skill Architecture
Architecture Principles
- Modular Skill-Registry Pattern: Skills are registered in a centralized registry with metadata, capabilities, and dependencies
- Chain-of-Thought Routers: Dynamic routing between specialized sub-agents based on task context
- Specialized Sub-Agents: Each sub-agent has specific domain expertise and clear responsibilities
- Hooks System: Lifecycle hooks enable cross-cutting concerns (logging, monitoring, state sync)
- Type-Safe I/O: All inputs and outputs validated against JSON schemas
Skill Registry Structure
Skills are registered in the internal skill registry with the following metadata:
skill_id: unique_identifier
name: display_name
version: semver_version
description: trigger_description
capabilities:
- capability_1
- capability_2
dependencies:
- dependency_1
inputs:
schema: input_schema_path
required_fields: [field1, field2]
outputs:
schema: output_schema_path
format: output_template
execution:
type: sequential | parallel | hybrid
sub_skills: [sub_skill_ids]
quality_gates: [gate_ids]
hooks:
pre_execution: [hook1, hook2]
post_execution: [hook3]
on_error: [error_handler]
Sub-Agent Registration
Each sub-agent is registered with:
sub_agent_id: sub-core-analysis
name: Ethical Game Monetization Designer
role: domain_expert
expertise_areas:
- Monetization model selection
- Ethical boundary analysis
- Dark pattern avoidance
- Regulatory compliance
input_requirements:
- game_description
- target_audience
- monetization_goals
output_format: analysis_scorecard
quality_gates: [G1, G2, G3, G4]
max_tokens: 40000
tool_permissions: [Read, WebFetch, Reasoning]
Chain-of-Thought Routing
The skill uses dynamic routing to determine which sub-agents to invoke:
def route_task(task_context):
# Analyze task requirements
required_capabilities = analyze_capabilities(task_context)
# Select sub-agents
selected_agents = []
for agent in skill_registry.list_agents():
if has_required_capabilities(agent, required_capabilities):
if can_execute_parallel(agent, selected_agents):
schedule_parallel(agent)
else:
schedule_sequential(agent)
return selected_agents
Execution Modes
Sequential Execution
Default mode for dependent tasks. Each sub-agent completes before the next starts.
requirements → evidence → core_analysis → knowledge → advisor → quality_gate
Parallel Execution
For independent sub-agents that can run concurrently (experimental feature).
[evidence_collector] ─┐
[user_input] ─→ [requirements] ├→ [synthesizer] ─→ [quality_gate]
[knowledge_lookup] ─┘
Hybrid Execution
Combines sequential and parallel execution for optimal performance.
Skill Resolution Process
1. Skill Registration (Load Time)
When the skill loads, it registers all components:
class SkillRegistry:
def __init__(self):
self.skills = {}
self.sub_agents = {}
self.hooks = {}
self.schemas = {}
def register_skill(self, skill_metadata):
skill_id = skill_metadata['skill_id']
self.skills[skill_id] = skill_metadata
# Load and validate schemas
self._load_schemas(skill_metadata)
def register_sub_agent(self, agent_metadata):
agent_id = agent_metadata['sub_agent_id']
self.sub_agents[agent_id] = agent_metadata
2. Skill Resolution (Invocation Time)
When user invokes the skill:
def resolve_skill(user_input, context):
# Step 1: Parse input
parsed_input = parse_user_input(user_input)
# Step 2: Check language
language = detect_language(parsed_input['text'])
# Step 3: Select sub-agents
selected_agents = route_task({
'input': parsed_input,
'language': language,
'context': context
})
# Step 4: Create execution plan
execution_plan = create_execution_plan(selected_agents)
# Step 5: Execute with hooks
result = execute_with_hooks(execution_plan)
return result
3. Skill Execution (Runtime)
Execution with hooks:
def execute_with_hooks(plan):
context = ExecutionContext()
try:
# Pre-execution hooks
for hook in plan.pre_hooks:
hook.before_execution(context)
# Execute sub-agents
for agent in plan.agents:
result = execute_agent(agent, context)
context.add_result(agent.id, result)
# Post-execution hooks
for hook in plan.post_hooks:
hook.after_execution(context)
# Quality gates
for gate in plan.quality_gates:
if not gate.validate(context):
gate.auto_fix(context)
return context.final_output()
except Exception as e:
# Error hooks
for hook in plan.error_hooks:
hook.handle_error(e, context)
raise
Input/Output Schemas
Input Schema
All inputs must conform to this structure:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["query", "language"],
"properties": {
"query": {
"type": "string",
"description": "User's analysis request",
"minLength": 10
},
"language": {
"type": "string",
"enum": ["en", "vi"],
"description": "Output language (English or Vietnamese)"
},
"context": {
"type": "object",
"properties": {
"game": {"type": "string"},
"audience": {"type": "string"},
"goals": {"type": "array", "items": {"type": "string"}}
}
},
"options": {
"type": "object",
"properties": {
"strict_mode": {"type": "boolean"},
"include_sources": {"type": "boolean"},
"max_tokens": {"type": "number"}
}
}
}
}
Output Schema
All outputs conform to this structure:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["metadata", "executive_summary", "analysis", "recommendation"],
"properties": {
"metadata": {
"type": "object",
"properties": {
"skill_version": {"type": "string"},
"timestamp": {"type": "string", "format": "date-time"},
"language": {"type": "string"},
"degradation_level": {"type": "integer", "minimum": 0, "maximum": 4}
}
},
"executive_summary": {
"type": "string",
"minLength": 100
},
"inputs_scope": {
"type": "object",
"properties": {
"object": {"type": "string"},
"scope": {"type": "string"},
"timeframe": {"type": "string"}
}
},
"evidence_collected": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {"type": "string"},
"tier": {"type": "integer", "minimum": 1, "maximum": 4},
"content": {"type": "string"},
"date": {"type": "string"}
}
}
},
"analysis": {
"type": "object",
"properties": {
"monetization_model": {"type": "string"},
"ethical_boundaries": {"type": "array"},
"regulatory_compliance": {"type": "object"},
"dark_pattern_analysis": {"type": "object"}
}
},
"recommendation": {
"type": "object",
"properties": {
"verdict": {
"type": "string",
"enum": ["Ethical & Sustainable", "Conditional", "Predatory Risk", "Inconclusive"]
},
"disclosure": {"type": "string"},
"risks": {"type": "array"},
"remediation": {"type": "array"}
}
}
}
}
Hooks System
Hook Types
- Pre-Execution Hooks: Run before any sub-agent executes
- Language detection
- Input validation
- Context initialization
- Sub-Agent Hooks: Run around each sub-agent execution
- Agent-specific logging
- Token budget tracking
- Result caching
- Post-Execution Hooks: Run after all sub-agents complete
- Quality gate validation
- Output formatting
- Result aggregation
- Error Hooks: Run on exceptions
- Error logging
- Graceful degradation
- Fallback execution
Hook Implementation
class LanguageDetectionHook(PreExecutionHook):
def execute(self, context):
# Detect Vietnamese characters
vi_chars = set('àáảãạăâđèéêìíòóôơùúưý')
if any(c in vi_chars for c in context.input_text):
context.language = 'vi'
else:
context.language = 'en'
log_info(f"Language detected: {context.language}")
Quality Gates
Quality gates validate output before delivery. See config/features/quality_gate_config.json for complete configuration.
Gate Enforcement
def enforce_quality_gates(context):
for gate in context.quality_gates:
attempt = 0
while attempt < gate.max_retries:
if gate.validate(context.output):
break
# Try auto-fix
if gate.auto_fix_available:
context.output = gate.auto_fix(context.output)
attempt += 1
else:
# Emit limitation
context.add_limitation(gate.name)
break
if attempt == gate.max_retries:
context.add_limitation(f"Failed gate: {gate.name}")
Graceful Degradation
The skill supports 5 degradation levels:
| Level | Condition | Behavior | |-------|-----------|----------| | 0 | All sources available | Full analysis | | 1 | Some sources fail | Secondary sources + flags | | 2 | Most sources fail | Knowledge base only + "historical" flag | | 3 | Required inputs missing | Partial analysis + "DATA UNAVAILABLE" | | 4 | All sources fail | Emit limitation notice, no fabrication |
Token Optimization
The skill implements smart token management:
class TokenBudgetManager:
def __init__(self):
self.budget = load_config('token_budgets.json')
self.usage = {}
def reserve_tokens(self, agent_id, estimated_tokens):
if self.available() < estimated_tokens:
# Trigger compression
self.compress_context()
self.usage[agent_id] = estimated_tokens
def compress_context(self):
# Remove less important sections
# Summarize verbose content
# Prioritize recent information
pass
Configuration Loading
Configuration is loaded from config/ directories:
class SkillConfig:
def __init__(self):
self.env = self.load_env_config()
self.llm = self.load_llm_config()
self.features = self.load_feature_flags()
self.quality_gates = self.load_quality_gate_config()
def load_env_config(self):
env_file = os.getenv('ENV_FILE', 'config/env/.env')
return dotenv_values(env_file)
Logging
Structured logging with contextual information:
class SkillLogger:
def log_agent_start(self, agent_id, context):
logger.info({
"event": "agent_start",
"agent_id": agent_id,
"language": context.language,
"timestamp": datetime.now().isoformat()
})
def log_gate_failure(self, gate_id, output):
logger.warning({
"event": "gate_failure",
"gate_id": gate_id,
"attempt": self.attempts[gate_id],
"output_preview": output[:100]
})
Error Handling
Production-grade error handling:
def execute_with_error_handling(plan):
try:
return execute_plan(plan)
except TimeoutError:
log_timeout()
return degraded_execution(level=3)
except APIError as e:
if e.status_code == 429:
return retry_with_backoff(plan)
else:
return degraded_execution(level=2)
except ValidationError as e:
log_validation_error(e)
return error_response(e)
except Exception as e:
log_unexpected_error(e)
return degraded_execution(level=4)
Extending the Skill
To add a new sub-agent:
- Create
skills/sub-new-agent.mdwith proper frontmatter - Register in skill registry metadata
- Define input/output schemas
- Add quality gates if needed
- Test with scenarios in
tests/test-scenarios.md
To add a new hook:
- Create hook class implementing appropriate interface
- Register in
config/hooks/ - Add to execution plan
- Test with various scenarios
Best Practices
- Always validate inputs against schemas
- Use hooks for cross-cutting concerns
- Respect token budgets - compress when needed
- Handle errors gracefully - degrade rather than fail
- Log everything with structured context
- Cite sources for all claims
- Disclose limitations before recommendations
- Test thoroughly with multiple scenarios
Version History
- v1.0.0 (2026-07-15): Initial production release with flexible architecture
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: dungnotnull
- Source: dungnotnull/healthy-microtransaction-economy-agent-skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.