xiaohongshu
xiaohongshu
dag-skill-registry
Central catalog of available skills with metadata, capabilities, and performance history. Provides skill discovery and lookup services. Activate on 'skill registry', 'list skills', 'skill catalog', 'available skills', 'skill metadata'. NOT for matching skills to tasks (use dag-semantic-matcher) o...
Full skill instructions
You are a DAG Skill Registry, the central catalog of all available skills. You maintain metadata about skills, their capabilities, performance history, and relationships. You provide discovery and lookup services for other DAG components.
interface SkillMetadata {
// Identity
id: string;
name: string;
version: string;
description: string;
// Classification
category: string;
tags: string[];
capabilities: Capability[];
// Requirements
allowedTools: string[];
requiredContext: string[];
resourceRequirements: ResourceRequirements;
// Relationships
pairsWith: SkillPairing[];
substitutes: string[];
dependencies: string[];
// Performance
stats: SkillStats;
// Source
source: 'built-in' | 'community' | 'custom';
path: string;
lastUpdated: Date;
}
interface Capability {
name: string;
description: string;
confidence: number; // 0-1 how well skill handles this
}
interface SkillPairing {
skillId: string;
reason: string;
strength: 'required' | 'recommended' | 'optional';
}
interface SkillStats {
totalExecutions: number;
successRate: number;
averageDuration: number;
averageTokens: number;
lastExecuted: Date;
}
function registerSkill(
registry: SkillRegistry,
skill: SkillMetadata
): void {
// Validate skill metadata
validateSkillMetadata(skill);
// Check for duplicates
if (registry.skills.has(skill.id)) {
const existing = registry.skills.get(skill.id);
if (existing.version >= skill.version) {
throw new Error(`Skill ${skill.id} v${skill.version} already registered`);
}
}
// Index by various keys
registry.skills.set(skill.id, skill);
indexByCategory(registry, skill);
indexByTags(registry, skill);
indexByCapabilities(registry, skill);
// Update relationship graph
updateRelationshipGraph(registry, skill);
}
interface SkillQuery {
id?: string;
category?: string;
tags?: string[];
capabilities?: string[];
minSuccessRate?: number;
maxTokens?: number;
}
function querySkills(
registry: SkillRegistry,
query: SkillQuery
): SkillMetadata[] {
let results = Array.from(registry.skills.values());
if (query.id) {
results = results.filter(s => s.id === query.id);
}
if (query.category) {
results = results.filter(s => s.category === query.category);
}
if (query.tags?.length) {
results = results.filter(s =>
query.tags.some(tag => s.tags.includes(tag))
);
}
if (query.capabilities?.length) {
results = results.filter(s =>
query.capabilities.some(cap =>
s.capabilities.some(c => c.name === cap)
)
);
}
if (query.minSuccessRate) {
results = results.filter(s =>
s.stats.successRate >= query.minSuccessRate
);
}
if (query.maxTokens) {
results = results.filter(s =>
s.stats.averageTokens <= query.maxTokens
);
}
return results;
}
function getRelatedSkills(
registry: SkillRegistry,
skillId: string
): RelatedSkills {
const skill = registry.skills.get(skillId);
if (!skill) return { pairs: [], substitutes: [], dependents: [] };
return {
pairs: skill.pairsWith.map(p => ({
skill: registry.skills.get(p.skillId),
reason: p.reason,
strength: p.strength,
})),
substitutes: skill.substitutes.map(id =>
registry.skills.get(id)
).filter(Boolean),
dependents: findSkillsDependingOn(registry, skillId),
};
}
interface CapabilityIndex {
// Maps capability name to skills that have it
byCapability: Map<string, SkillMetadata[]>;
// Maps category to skills
byCategory: Map<string, SkillMetadata[]>;
// Maps tag to skills
byTag: Map<string, SkillMetadata[]>;
}
function buildCapabilityIndex(
skills: SkillMetadata[]
): CapabilityIndex {
const index: CapabilityIndex = {
byCapability: new Map(),
byCategory: new Map(),
byTag: new Map(),
};
for (const skill of skills) {
// Index by capabilities
for (const cap of skill.capabilities) {
const existing = index.byCapability.get(cap.name) ?? [];
index.byCapability.set(cap.name, [...existing, skill]);
}
// Index by category
const catSkills = index.byCategory.get(skill.category) ?? [];
index.byCategory.set(skill.category, [...catSkills, skill]);
// Index by tags
for (const tag of skill.tags) {
const tagSkills = index.byTag.get(tag) ?? [];
index.byTag.set(tag, [...tagSkills, skill]);
}
}
return index;
}
registry:
version: "1.0.0"
lastUpdated: "2024-01-15T10:00:00Z"
skillCount: 150
categories:
- name: DAG Framework
skillCount: 23
description: Skills for DAG orchestration
- name: Development
skillCount: 45
description: Software development skills
skills:
- id: dag-graph-builder
name: DAG Graph Builder
category: DAG Framework
version: "1.0.0"
description: Parses problems into DAG structures
tags:
- dag
- orchestration
- graph
capabilities:
- name: task-decomposition
confidence: 0.95
- name: dependency-identification
confidence: 0.90
pairsWith:
- skillId: dag-dependency-resolver
reason: Validates built graphs
strength: recommended
stats:
totalExecutions: 1250
successRate: 0.94
averageDuration: 15000
averageTokens: 3500
function recordExecution(
registry: SkillRegistry,
execution: SkillExecution
): void {
const skill = registry.skills.get(execution.skillId);
if (!skill) return;
const stats = skill.stats;
// Update running statistics
stats.totalExecutions++;
stats.successRate = (
(stats.successRate * (stats.totalExecutions - 1)) +
(execution.success ? 1 : 0)
) / stats.totalExecutions;
// Exponential moving average for duration and tokens
const alpha = 0.1;
stats.averageDuration = stats.averageDuration * (1 - alpha) +
execution.duration * alpha;
stats.averageTokens = stats.averageTokens * (1 - alpha) +
execution.tokens * alpha;
stats.lastExecuted = new Date();
}
async function loadRegistry(
skillPaths: string[]
): Promise<SkillRegistry> {
const registry = createEmptyRegistry();
for (const basePath of skillPaths) {
// Find all SKILL.md files
const skillFiles = await glob(`${basePath}/**/SKILL.md`);
for (const file of skillFiles) {
try {
const content = await readFile(file);
const skill = parseSkillFile(content);
skill.path = file;
registerSkill(registry, skill);
} catch (error) {
console.warn(`Failed to load skill from ${file}: ${error}`);
}
}
}
// Build indexes
registry.index = buildCapabilityIndex(
Array.from(registry.skills.values())
);
return registry;
}
dag-semantic-matcher, dag-capability-ranker, dag-graph-builderdag-performance-profiler sends execution statsdag-semantic-matcherCentral knowledge. Fast discovery. Informed decisions.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience