skill-writer
- Repo stars 2,549
- Author updated Live
- Author repo torchrec
- Domain
- Design
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @meta-pytorch · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-writer
description: Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, wr…
category: design
runtime: no special runtime
---
# skill-writer output preview
## PART A: Task fit
- Use case: Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill for TorchRec, or needs help with SKILL.md files..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “When to use this Skill / Instructions / Step 1: Determine Skill scope” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill for TorchRec, or needs help with SKILL.md files.”.
- **02** When the source has headings, the agent prioritizes “When to use this Skill / Instructions / Step 1: Determine Skill scope” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/sharding-analyzer`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “When to use this Skill / Instructions / Step 1: Determine Skill scope”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: skill-writer
description: Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, wr…
category: design
source: meta-pytorch/torchrec
---
# skill-writer
## When to use
- Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “When to use this Skill / Instructions / Step 1: Determine Skill scope” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "skill-writer" {
input -> user goal + target files + boundaries + acceptance criteria
context -> When to use this Skill / Instructions / Step 1: Determine Skill scope
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} TorchRec Skill Writer
This Skill helps you create well-structured Agent Skills for Claude Code specifically for the TorchRec project.
When to use this Skill
Use this Skill when:
- Creating a new Agent Skill for TorchRec
- Writing or updating SKILL.md files
- Designing skill structure and frontmatter
- Converting existing TorchRec workflows into Skills
Instructions
Step 1: Determine Skill scope
First, understand what the Skill should do:
Ask clarifying questions:
- What specific TorchRec capability should this Skill provide?
- When should Claude use this Skill?
- What tools or resources does it need?
Keep it focused: One Skill = one capability
- Good: "sharding-optimizer", "embedding-config-validator"
- Too broad: "distributed-training", "model-tools"
Step 2: Choose Skill location
TorchRec Skills should be placed in:
fbcode/torchrec/.claude/skills/<skill-name>/SKILL.md
Step 3: Create Skill structure
Create the directory and files:
mkdir -p fbcode/torchrec/.claude/skills/skill-name
For multi-file Skills:
skill-name/
├── SKILL.md (required)
├── reference.md (optional)
├── examples.md (optional)
└── templates/ (optional)
Step 4: Write SKILL.md frontmatter
Create YAML frontmatter with required fields:
---
name: skill-name
description: Brief description of what this does and when to use it
---
Field requirements:
name:
- Lowercase letters, numbers, hyphens only
- Max 64 characters
- Must match directory name
- Good:
sharding-optimizer,kjt-validator - Bad:
Sharding_Optimizer,KJT Validator!
description:
- Max 1024 characters
- Include BOTH what it does AND when to use it
- Use specific trigger words users would say
- Mention TorchRec concepts (embeddings, sharding, KJT, etc.)
Optional frontmatter fields:
allowed-tools: Restrict tool access (comma-separated list)
allowed-tools: Read, Grep, Globargument-hint: Hint for expected arguments
argument-hint: [feature or task description]
Step 5: Write effective descriptions
The description is critical for Claude to discover your Skill.
Formula: [What it does] + [When to use it] + [TorchRec keywords]
Examples:
✅ Good:
description: Optimize sharding plans for TorchRec embedding tables. Use when configuring DistributedModelParallel, analyzing sharding strategies, or tuning embedding performance.
✅ Good:
description: Validate KeyedJaggedTensor (KJT) configurations and debug sparse tensor issues. Use when working with KJT, debugging embedding lookups, or validating feature configurations.
❌ Too vague:
description: Helps with TorchRec
description: For distributed training
Step 6: Structure the Skill content
Use clear Markdown sections:
# Skill Name
Brief overview of what this Skill does for TorchRec.
## Quick start
Provide a simple example to get started immediately.
## Instructions
Step-by-step guidance for Claude:
1. First step with clear action
2. Second step with expected outcome
3. Handle edge cases
## TorchRec-Specific Patterns
Document TorchRec-specific patterns and conventions.
## Examples
Show concrete usage examples with TorchRec code.
## Best practices
- Key conventions to follow
- Common pitfalls to avoid
- When to use vs. not use
## Files to Reference
List important TorchRec files for context:
- `torchrec/distributed/` - Distributed training code
- `torchrec/modules/` - Core modules
Step 7: Validate the Skill
Check these requirements:
✅ File structure:
- SKILL.md exists in correct location
- Directory name matches frontmatter
name
✅ YAML frontmatter:
- Opening
---on line 1 - Closing
---before content - Valid YAML (no tabs, correct indentation)
-
namefollows naming rules -
descriptionis specific and < 1024 chars
✅ Content quality:
- Clear instructions for Claude
- TorchRec-specific examples provided
- Edge cases handled
- References to relevant TorchRec code
TorchRec Skill Ideas
Here are some useful Skills to consider creating:
| Skill Name | Purpose |
|---|---|
sharding-optimizer |
Analyze and optimize embedding sharding plans |
kjt-validator |
Validate KeyedJaggedTensor configurations |
distributed-debug |
Debug distributed training issues |
embedding-benchmark |
Benchmark embedding performance |
migration-helper |
Help migrate to newer TorchRec APIs |
Example: Complete TorchRec Skill
---
name: sharding-analyzer
description: Analyze TorchRec sharding plans and suggest optimizations. Use when reviewing ShardingPlan, DistributedModelParallel configuration, or optimizing embedding distribution across devices.
---
# Sharding Analyzer
Analyze TorchRec sharding plans and suggest optimizations for embedding tables.
## Quick start
Run `/sharding-analyzer` on a file containing a ShardingPlan to get optimization suggestions.
## Instructions
1. Read the sharding plan configuration
2. Analyze table sizes and sharding strategies
3. Check for common anti-patterns:
- Large tables with TABLE_WISE sharding
- Small tables with ROW_WISE sharding
- Unbalanced memory distribution
4. Suggest optimizations
## TorchRec Sharding Strategies
| Strategy | Best For | Avoid When |
|----------|----------|------------|
| TABLE_WISE | Small tables, < 1M rows | Large tables |
| ROW_WISE | Large tables, uniform access | Small tables |
| COLUMN_WISE | Wide embeddings, > 256 dim | Narrow embeddings |
## Files to Reference
- `torchrec/distributed/planner/` - Sharding planner
- `torchrec/distributed/sharding/` - Sharding implementations
Output format
When creating a Skill, I will:
- Ask clarifying questions about scope and requirements
- Suggest a Skill name and location
- Create the SKILL.md file with proper frontmatter
- Include TorchRec-specific instructions and examples
- Add references to relevant TorchRec code
- Provide validation checklist
Decide Fit First
Design Intent
How To Use It
Boundaries And Review