Organize workspace: Frontend, Backend, and Tests in one repo
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>log</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="log-white" fill="#000000" transform="translate(85.572501, 42.666667)">
|
||||
<path d="M236.349632,7.10542736e-15 L1.68296533,7.10542736e-15 L1.68296533,234.666667 L44.349632,234.666667 L44.349632,192 L44.349632,169.6 L44.349632,42.6666667 L218.642965,42.6666667 L300.349632,124.373333 L300.349632,169.6 L300.349632,192 L300.349632,234.666667 L343.016299,234.666667 L343.016299,106.666667 L236.349632,7.10542736e-15 L236.349632,7.10542736e-15 Z M4.26325641e-14,405.333333 L4.26325641e-14,277.360521 L28.8096875,277.360521 L28.8096875,382.755208 L83.81,382.755208 L83.81,405.333333 L4.26325641e-14,405.333333 Z M153.17,275.102708 C173.279583,275.102708 188.692917,281.484792 199.41,294.248958 C209.705625,306.47125 214.853437,322.185625 214.853437,341.392083 C214.853437,362.404792 208.772396,379.112604 196.610312,391.515521 C186.134062,402.232604 171.653958,407.591146 153.17,407.591146 C133.060417,407.591146 117.647083,401.209062 106.93,388.444896 C96.634375,376.222604 91.4865625,360.267396 91.4865625,340.579271 C91.4865625,319.988021 97.5676042,303.490937 109.729687,291.088021 C120.266146,280.431146 134.74625,275.102708 153.17,275.102708 Z M153.079687,297.680833 C142.663646,297.680833 134.625833,302.015833 128.96625,310.685833 C123.848542,318.512917 121.289687,328.567708 121.289687,340.850208 C121.289687,355.059375 124.330208,366.0775 130.41125,373.904583 C136.131042,381.310208 143.717292,385.013021 153.17,385.013021 C163.525833,385.013021 171.59375,380.647917 177.37375,371.917708 C182.491458,364.211042 185.050312,354.035833 185.050312,341.392083 C185.050312,327.483958 182.009792,316.616354 175.92875,308.789271 C170.208958,301.383646 162.592604,297.680833 153.079687,297.680833 Z M343.91,333.715521 L343.91,399.011458 C336.564583,401.48 331.386667,403.105625 328.37625,403.888333 C319.043958,406.356875 309.019271,407.591146 298.302187,407.591146 C277.229271,407.591146 261.18375,402.292812 250.165625,391.696146 C237.943333,380.015729 231.832187,363.729375 231.832187,342.837083 C231.832187,318.813958 239.418437,300.69125 254.590937,288.468958 C265.609062,279.558125 280.480521,275.102708 299.205312,275.102708 C315.220729,275.102708 330.122292,278.022812 343.91,283.863021 L334.065937,306.350833 C327.563437,303.099583 321.87375,300.826719 316.996875,299.53224 C312.12,298.23776 306.761458,297.590521 300.92125,297.590521 C286.952917,297.590521 276.657292,302.13625 270.034375,311.227708 C264.435,318.934375 261.635312,329.079479 261.635312,341.663021 C261.635312,356.775312 265.849896,368.154687 274.279062,375.801146 C281.022396,381.942396 289.391354,385.013021 299.385937,385.013021 C305.226146,385.013021 310.765312,384.019583 316.003437,382.032708 L316.003437,356.293646 L293.967187,356.293646 L293.967187,333.715521 L343.91,333.715521 Z" id="XLS">
|
||||
|
||||
</path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,50 @@
|
||||
---
|
||||
name: init
|
||||
description: Generate or update workspace instructions file for AI coding agents
|
||||
argument-hint: Optionally specify a focus area or pattern to document for agents
|
||||
agent: agent
|
||||
---
|
||||
Related skill: `agent-customization`.
|
||||
|
||||
Generate or update workspace instructions (`.github/copilot-instructions.md` as first choice, or `AGENTS.md` if it is already present) for guiding AI coding agents in this workspace.
|
||||
|
||||
## Discovery
|
||||
|
||||
Search for existing AI conventions using this glob pattern: `**/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md}`
|
||||
|
||||
Then, start a subagent to research essential knowledge that helps an AI agent be immediately productive. Only include sections the workspace benefits from—skip any that don't apply:
|
||||
|
||||
```markdown
|
||||
# Project Guidelines
|
||||
|
||||
## Code Style
|
||||
{Language and formatting preferences - reference key files that exemplify patterns}
|
||||
|
||||
## Architecture
|
||||
{Major components, service boundaries, data flows, the "why" behind structural decisions}
|
||||
|
||||
## Build and Test
|
||||
{Commands to install, build, test - agents will attempt to run these automatically}
|
||||
|
||||
## Project Conventions
|
||||
{Patterns that differ from common practices - include specific examples from the codebase}
|
||||
|
||||
## Integration Points
|
||||
{External dependencies and cross-component communication}
|
||||
|
||||
## Security
|
||||
{Sensitive areas and auth patterns}
|
||||
```
|
||||
|
||||
## Guidelines
|
||||
|
||||
- If `.github/copilot-instructions.md`/`AGENTS.md` exists, merge intelligently—preserve valuable content while updating outdated sections
|
||||
- If `AGENTS.md` exists, prefer updating it; for monorepos, use nested files per package (closest file to edited code wins)
|
||||
- Write concise, actionable instructions (~20-50 lines) using markdown structure
|
||||
- Link specific examples from the codebase when describing patterns
|
||||
- Reference key files/directories that exemplify important patterns
|
||||
- Avoid generic advice ("write tests", "handle errors")—focus on THIS project's specific approaches
|
||||
- Document only discoverable patterns, not aspirational practices
|
||||
- List build/test commands explicitly—agents will attempt to run them automatically
|
||||
|
||||
Update `.github/copilot-instructions.md`/`AGENTS.md`, then ask for feedback on unclear or incomplete sections to iterate.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
name: plan
|
||||
description: Research and plan with the Plan agent
|
||||
agent: Plan
|
||||
argument-hint: Describe what you want to plan or research
|
||||
---
|
||||
Plan my task.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: savePrompt
|
||||
description: Generalize the current discussion into a reusable prompt and save it as a file
|
||||
tools: [ 'edit', 'search' ]
|
||||
---
|
||||
Generalize the current discussion into a reusable prompt that can be applied in similar contexts.
|
||||
|
||||
Think step by step:
|
||||
1. Review the conversation to identify the user's primary goal or task pattern
|
||||
2. If there is no conversation present, reply to the user that the `/savePrompt` prompt expects an active discussion to generalize. Keep the reply concise.
|
||||
3. Generalize the task into a reusable prompt that could apply to similar scenarios
|
||||
4. Extract the core intent, removing conversation-specific details (e.g., specific file names, variable names, or project-specific context)
|
||||
5. Craft the generalized multi-line markdown text prompt, using placeholders where appropriate (e.g., "the selected code", "the current file", "the specified functionality")
|
||||
6. Create a very concise action-oriented title in camelCase format that will be used for the slash command (1-3 words, e.g., "generateUnitTests", "refactorForPerformance", "explainApiDesign", etc)
|
||||
7. Write a brief description (1 sentence, max 15 words) explaining the goal of the prompt
|
||||
8. If applicable, define an argument-hint that describes the expected inputs for the prompt
|
||||
9. Save the resulting prompt in an untitled file with URI `untitled:${promptFileName}.prompt.md`, where `${promptFileName}` is the concise action-oriented title from step 6
|
||||
|
||||
Here's an example of the expected output format:
|
||||
```
|
||||
---
|
||||
name: ${The concise title in camelCase format. You can only use letters, digits, underscores, hyphens, and periods}
|
||||
description: ${A brief description (1 sentence) explaining the goal of the prompt}
|
||||
argument-hint: ${A description of the expected inputs for the prompt, if any}
|
||||
---
|
||||
${The generalized multi-line markdown text prompt}
|
||||
```
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
name: agent-customization
|
||||
description: 'Create, update, review, fix, or debug VS Code agent customization files (.instructions.md, .prompt.md, .agent.md, SKILL.md, copilot-instructions.md, AGENTS.md). Use for: saving coding preferences; troubleshooting why instructions/skills/agents are ignored or not invoked; configuring applyTo patterns; defining tool restrictions; creating custom agent modes or specialized workflows; packaging domain knowledge; fixing YAML frontmatter syntax.'
|
||||
---
|
||||
|
||||
# Agent Customization
|
||||
|
||||
## Decision Flow
|
||||
|
||||
| Primitive | When to Use |
|
||||
|-----------|-------------|
|
||||
| Workspace Instructions | Always-on, applies everywhere in the project |
|
||||
| File Instructions | Explicit via `applyTo` patterns, or on-demand via `description` |
|
||||
| MCP | Integrates external systems, APIs, or data |
|
||||
| Custom Agents | Subagents for context isolation, or multi-stage workflows with tool restrictions |
|
||||
| Prompts | Single focused task with parameterized inputs |
|
||||
| Skills | On-demand workflow with bundled assets (scripts/templates) |
|
||||
|
||||
## Quick Reference
|
||||
|
||||
Consult the reference docs for templates, domain examples, advanced frontmatter options, asset organization, anti-patterns, and creation checklists.
|
||||
|
||||
| Type | File | Location | Reference |
|
||||
|------|------|----------|-----------|
|
||||
| Workspace Instructions | `copilot-instructions.md`, `AGENTS.md` | `.github/` or root | [Link](./primitives/workspace-instructions.md) |
|
||||
| File Instructions | `*.instructions.md` | `.github/instructions/` | [Link](./primitives/instructions.md) |
|
||||
| Prompts | `*.prompt.md` | `.github/prompts/` | [Link](./primitives/prompts.md) |
|
||||
| Custom Agents | `*.agent.md` | `.github/agents/` | [Link](./primitives/agents.md) |
|
||||
| Skills | `SKILL.md` | `.github/skills/<name>/`, `.agents/skills/<name>/`, `.claude/skills/<name>/` | [Link](./primitives/skills.md) |
|
||||
|
||||
**User-level**: `{{USER_PROMPTS_FOLDER}}/` (*.prompt.md, *.instructions.md, *.agent.md; not skills)
|
||||
Customizations roam with user's settings sync
|
||||
|
||||
## Creation Process
|
||||
|
||||
If you need to explore or validate patterns in the codebase, use a read-only subagent. If the ask-questions tool is available, use it to interview the user and clarify requirements.
|
||||
|
||||
Follow these steps when creating any customization file.
|
||||
|
||||
### 1. Determine Scope
|
||||
|
||||
Ask the user where they want the customization:
|
||||
- **Workspace**: For project-specific, team-shared customizations → `.github/` folder
|
||||
- **User profile**: For personal, cross-workspace customizations → `{{USER_PROMPTS_FOLDER}}/`
|
||||
|
||||
### 2. Choose the Right Primitive
|
||||
|
||||
Use the Decision Flow above to select the appropriate file type based on the user's need.
|
||||
|
||||
### 3. Create the File
|
||||
|
||||
Create the file directly at the appropriate path:
|
||||
- Use the location tables in each reference file
|
||||
- Include required frontmatter as needed
|
||||
- Add the body content following the templates
|
||||
|
||||
### 4. Validate
|
||||
|
||||
After creating:
|
||||
- Confirm the file is in the correct location
|
||||
- Verify frontmatter syntax (YAML between `---` markers)
|
||||
- Check that `description` is present and meaningful
|
||||
|
||||
## Edge Cases
|
||||
|
||||
**Instructions vs Skill?** Does this apply to *most* work, or *specific* tasks? Most → Instructions. Specific → Skill.
|
||||
|
||||
**Skill vs Prompt?** Multi-step workflow with bundled assets → Skill. Single focused task with inputs → Prompt.
|
||||
|
||||
**Skill vs Custom Agent?** Same capabilities for all steps → Skill. Need context isolation (subagent returns single output) or different tool restrictions per stage → Custom Agent.
|
||||
@@ -0,0 +1,111 @@
|
||||
# [Custom Agents (.agent.md)](https://code.visualstudio.com/docs/copilot/customization/custom-agents)
|
||||
|
||||
Custom personas with specific tools, instructions, and behaviors. Use for orchestrated workflows with role-based tool restrictions.
|
||||
|
||||
## Locations
|
||||
|
||||
| Path | Scope |
|
||||
|------|-------|
|
||||
| `.github/agents/*.agent.md` | Workspace |
|
||||
| `<profile>/agents/*.agent.md` | User profile |
|
||||
|
||||
## Frontmatter
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: "<required>" # For agent picker and subagent discovery
|
||||
name: "Agent Name" # Optional, defaults to filename
|
||||
tools: ["search", "web"] # Optional: aliases, MCP (<server>/*), extension tools
|
||||
model: "Claude Sonnet 4" # Optional, uses picker default; supports array for fallback
|
||||
argument-hint: "Task..." # Optional, input guidance
|
||||
agents: ["Agent1", "Agent2"] # Optional, restrict allowed subagents by name (omit = all, [] = none)
|
||||
user-invokable: true # Optional, show in agent picker (default: true)
|
||||
disable-model-invocation: false # Optional, prevent subagent invocation (default: false)
|
||||
handoffs: [...] # Optional, transitions to other agents
|
||||
---
|
||||
```
|
||||
|
||||
### Invocation Control
|
||||
|
||||
| Attribute | Default | Effect |
|
||||
|-----------|---------|--------|
|
||||
| `user-invokable: false` | `true` | Hide from agent picker, only accessible as subagent |
|
||||
| `disable-model-invocation: true` | `false` | Prevent other agents from invoking as subagent |
|
||||
|
||||
### Model Fallback
|
||||
|
||||
```yaml
|
||||
model: ['Claude Sonnet 4.5 (copilot)', 'GPT-5 (copilot)'] # First available model is used
|
||||
```
|
||||
|
||||
## Tools
|
||||
|
||||
Sources: built-in aliases, specific tools, MCP servers (`<server>/*`), extension tools.
|
||||
|
||||
**Special**: `[]` = no tools, omit = defaults. Body reference: `#tool:<name>`
|
||||
|
||||
### Tool Aliases
|
||||
|
||||
| Alias | Purpose |
|
||||
|-------|---------|
|
||||
| `execute` | Run shell commands |
|
||||
| `read` | Read file contents |
|
||||
| `edit` | Edit files |
|
||||
| `search` | Search files or text |
|
||||
| `agent` | Invoke custom agents as subagents |
|
||||
| `web` | Fetch URLs and web search |
|
||||
| `todo` | Manage task lists |
|
||||
|
||||
### Common Patterns
|
||||
|
||||
```yaml
|
||||
tools: ["read", "search"] # Read-only research
|
||||
tools: ["myserver/*"] # MCP server only
|
||||
tools: ["read", "edit", "search"] # No terminal access
|
||||
tools: [] # Conversational only
|
||||
```
|
||||
|
||||
To discover available tools, check your current tool list or use `#tool:` syntax in the body to reference specific tools.
|
||||
|
||||
## Template
|
||||
|
||||
```markdown
|
||||
---
|
||||
description: "{Use when... trigger phrases for subagent discovery}"
|
||||
tools: ["{minimal set of tool aliases}"]
|
||||
user-invokable: false
|
||||
---
|
||||
You are a specialist at {specific task}. Your job is to {clear purpose}.
|
||||
|
||||
## Constraints
|
||||
- DO NOT {thing this agent should never do}
|
||||
- DO NOT {another restriction}
|
||||
- ONLY {the one thing this agent does}
|
||||
|
||||
## Approach
|
||||
1. {Step one of how this agent works}
|
||||
2. {Step two}
|
||||
3. {Step three}
|
||||
|
||||
## Output Format
|
||||
{Exactly what this agent should return}
|
||||
```
|
||||
|
||||
## Invocation
|
||||
|
||||
- **Manual**: Agent selector in chat
|
||||
- **Subagent**: Parent agent delegates based on `description` match (when `infer` allows)
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Single role**: One persona with focused responsibilities per agent
|
||||
2. **Minimal tools**: Only include what the role needs—excess tools dilute focus
|
||||
3. **Clear boundaries**: Define what the agent should NOT do
|
||||
4. **Keyword-rich description**: Include trigger words so parent agents know when to delegate
|
||||
|
||||
## Anti-patterns
|
||||
|
||||
- **Swiss-army agents**: Too many tools, tries to do everything
|
||||
- **Vague descriptions**: "A helpful agent" doesn't guide delegation—be specific
|
||||
- **Role confusion**: Description doesn't match body persona
|
||||
- **Circular handoffs**: A → B → A without progress criteria
|
||||
@@ -0,0 +1,69 @@
|
||||
# [File-Specific Instructions (.instructions.md)](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
||||
|
||||
Guidelines loaded on-demand when relevant to the current task, or explicitly when files match a pattern.
|
||||
|
||||
## Locations
|
||||
|
||||
| Path | Scope |
|
||||
|------|-------|
|
||||
| `.github/instructions/*.instructions.md` | Workspace |
|
||||
| `<profile>/instructions/*.instructions.md` | User profile |
|
||||
|
||||
## Frontmatter
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: "<required>" # For on-demand discovery—keyword-rich
|
||||
name: "Instruction Name" # Optional, defaults to filename
|
||||
applyTo: "**/*.ts" # Optional, auto-attach for matching files
|
||||
---
|
||||
```
|
||||
|
||||
## Discovery Modes
|
||||
|
||||
| Mode | Trigger | Use Case |
|
||||
|------|---------|----------|
|
||||
| **On-demand** (`description`) | Agent detects task relevance | Task-based: migrations, refactoring, API work |
|
||||
| **Explicit** (`applyTo`) | Files matching glob in context | File-based: language standards, framework rules |
|
||||
| **Manual** | `Add Context` → `Instructions` | Ad-hoc attachment |
|
||||
|
||||
## Template
|
||||
|
||||
```markdown
|
||||
---
|
||||
description: "Use when writing database migrations, schema changes, or data transformations. Covers safety checks and rollback patterns."
|
||||
---
|
||||
# Migration Guidelines
|
||||
|
||||
- Always create reversible migrations
|
||||
- Test rollback before merging
|
||||
- Never drop columns in the same release as code removal
|
||||
```
|
||||
|
||||
Note the "Use when..." pattern in the description—this helps on-demand discovery.
|
||||
|
||||
## Explicit File Matching (optional)
|
||||
|
||||
Use `applyTo` when the instruction applies to specific file types or folders:
|
||||
|
||||
```yaml
|
||||
applyTo: "**/*.py" # All Python files
|
||||
applyTo: ["src/**", "lib/**"] # Multiple patterns (OR)
|
||||
applyTo: "src/api/**/*.ts" # Specific folder + extension
|
||||
```
|
||||
|
||||
Applied when creating or modifying matching files, not for read-only operations.
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Keyword-rich descriptions**: Include trigger words for on-demand discovery
|
||||
2. **One concern per file**: Separate files for testing, styling, documentation
|
||||
3. **Concise and actionable**: Share context window—keep focused
|
||||
4. **Show, don't tell**: Brief code examples over lengthy explanations
|
||||
|
||||
## Anti-patterns
|
||||
|
||||
- **Vague descriptions**: "Helpful coding tips" doesn't enable discovery
|
||||
- **Overly broad applyTo**: `"**"` with content only relevant to specific files
|
||||
- **Duplicating docs**: Copy README instead of linking
|
||||
- **Mixing concerns**: Testing + API design + styling in one file
|
||||
@@ -0,0 +1,64 @@
|
||||
# [Prompts (.prompt.md)](https://code.visualstudio.com/docs/copilot/customization/prompt-files)
|
||||
|
||||
Reusable task templates triggered on-demand in chat. Single focused task with parameterized inputs.
|
||||
|
||||
## Locations
|
||||
|
||||
| Path | Scope |
|
||||
|------|-------|
|
||||
| `.github/prompts/*.prompt.md` | Workspace |
|
||||
| `<profile>/prompts/*.prompt.md` | User profile |
|
||||
|
||||
## Frontmatter
|
||||
|
||||
```yaml
|
||||
---
|
||||
description: "<required>" # Prompt description for discovery
|
||||
name: "Prompt Name" # Optional, defaults to filename
|
||||
agent: "agent" # Optional: ask, edit, agent, or custom agent
|
||||
tools: ["search", "web"] # Optional: built-in, MCP (<server>/*), extension
|
||||
model: "Claude Sonnet 4" # Optional, uses picker default
|
||||
---
|
||||
```
|
||||
|
||||
## Template
|
||||
|
||||
```markdown
|
||||
---
|
||||
description: "Generate test cases for selected code"
|
||||
agent: "agent"
|
||||
---
|
||||
Generate comprehensive test cases for the provided code:
|
||||
- Include edge cases and error scenarios
|
||||
- Follow existing test patterns in the codebase
|
||||
- Use descriptive test names
|
||||
```
|
||||
|
||||
**Context references**: Use Markdown links for files (`[config](./config.json)`) and `#tool:<name>` for tools.
|
||||
|
||||
## Invocation
|
||||
|
||||
- **Chat**: Type `/` → select prompt
|
||||
- **Command**: `Chat: Run Prompt...`
|
||||
- **Editor**: Open prompt file → play button
|
||||
|
||||
**Tip**: Use `chat.promptFilesRecommendations` to show prompts as actions when starting a new chat.
|
||||
|
||||
## When to Use
|
||||
|
||||
- Generate test cases for specific code
|
||||
- Create READMEs from specs
|
||||
- Summarize metrics with custom parameters
|
||||
- One-off generation tasks
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Single task focus**: One prompt = one well-defined task
|
||||
2. **Output examples**: Show expected format when quality depends on structure
|
||||
3. **Reuse over duplication**: Reference instruction files instead of copying
|
||||
|
||||
## Anti-patterns
|
||||
|
||||
- **Multi-task prompts**: "create and test and deploy" in one prompt
|
||||
- **Vague descriptions**: Descriptions that don't help users understand when to use
|
||||
- **Over-tooling**: Many tools when the task only needs search or file access
|
||||
@@ -0,0 +1,85 @@
|
||||
# [Agent Skills (SKILL.md)](https://code.visualstudio.com/docs/copilot/customization/agent-skills)
|
||||
|
||||
Folders of instructions, scripts, and resources that agents load on-demand for specialized tasks.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
.github/skills/<skill-name>/
|
||||
├── SKILL.md # Required (name must match folder)
|
||||
├── scripts/ # Executable code
|
||||
├── references/ # Docs loaded as needed
|
||||
└── assets/ # Templates, boilerplate
|
||||
```
|
||||
|
||||
## Locations
|
||||
|
||||
| Path | Scope |
|
||||
|------|-------|
|
||||
| `.github/skills/<name>/` | Project |
|
||||
| `.agents/skills/<name>/` | Project |
|
||||
| `.claude/skills/<name>/` | Project |
|
||||
| `~/.copilot/skills/<name>/` | Personal |
|
||||
| `~/.claude/skills/<name>/` | Personal |
|
||||
|
||||
## SKILL.md Format
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: skill-name # Required: 1-64 chars, lowercase alphanumeric + hyphens, must match folder
|
||||
description: 'What and when to use. Max 1024 chars.'
|
||||
---
|
||||
```
|
||||
|
||||
### Body
|
||||
|
||||
- What the skill accomplishes
|
||||
- When to use (triggers and use cases)
|
||||
- Step-by-step procedures
|
||||
- References to resources: `[script](./scripts/test.js)`
|
||||
|
||||
## Template
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: webapp-testing
|
||||
description: 'Test web applications using Playwright. Use for verifying frontend, debugging UI, capturing screenshots.'
|
||||
---
|
||||
|
||||
# Web Application Testing
|
||||
|
||||
## When to Use
|
||||
- Verify frontend functionality
|
||||
- Debug UI behavior
|
||||
|
||||
## Procedure
|
||||
1. Start the web server
|
||||
2. Run [test script](./scripts/test.js)
|
||||
3. Review screenshots in `./screenshots/`
|
||||
```
|
||||
|
||||
## Progressive Loading
|
||||
|
||||
1. **Discovery** (~100 tokens): Agent reads `name` and `description`
|
||||
2. **Instructions** (<5000 tokens): Loads `SKILL.md` body when relevant
|
||||
3. **Resources**: Additional files load only when referenced
|
||||
|
||||
Keep file references one level deep from `SKILL.md`.
|
||||
|
||||
## When to Use
|
||||
|
||||
Repeatable, on-demand workflows with bundled assets (scripts, templates, reference docs).
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Keyword-rich descriptions**: Include trigger words for discovery
|
||||
2. **Progressive loading**: Keep SKILL.md under 500 lines; use reference files
|
||||
3. **Relative paths**: Always use `./` for skill resources
|
||||
4. **Self-contained**: Include all procedural knowledge to complete the task
|
||||
|
||||
## Anti-patterns
|
||||
|
||||
- **Vague descriptions**: "A helpful skill" doesn't enable discovery
|
||||
- **Monolithic SKILL.md**: Everything in one file instead of references
|
||||
- **Name mismatch**: Folder name doesn't match `name` field
|
||||
- **Missing procedures**: Descriptions without step-by-step guidance
|
||||
@@ -0,0 +1,64 @@
|
||||
# [Workspace Instructions](https://code.visualstudio.com/docs/copilot/customization/custom-instructions)
|
||||
|
||||
Guidelines that automatically apply to all chat requests across your entire workspace.
|
||||
|
||||
## File Types (Choose One)
|
||||
|
||||
| File | Location | Purpose |
|
||||
|------|----------|---------|
|
||||
| `copilot-instructions.md` | `.github/` | Project-wide standards (recommended, cross-editor) |
|
||||
| `AGENTS.md` | Root or subfolders | Open standard, monorepo hierarchy support |
|
||||
|
||||
Use **only one**—not both.
|
||||
|
||||
## AGENTS.md Hierarchy
|
||||
|
||||
For monorepos, the closest file in the directory tree takes precedence:
|
||||
|
||||
```
|
||||
/AGENTS.md # Root defaults
|
||||
/frontend/AGENTS.md # Frontend-specific (overrides root)
|
||||
/backend/AGENTS.md # Backend-specific (overrides root)
|
||||
```
|
||||
|
||||
## Template
|
||||
|
||||
Only include sections the workspace benefits from:
|
||||
|
||||
```markdown
|
||||
# Project Guidelines
|
||||
|
||||
## Code Style
|
||||
{Language and formatting preferences—reference key files that exemplify patterns}
|
||||
|
||||
## Architecture
|
||||
{Major components, service boundaries, the "why" behind structural decisions}
|
||||
|
||||
## Build and Test
|
||||
{Commands to install, build, test—agents will attempt to run these}
|
||||
|
||||
## Conventions
|
||||
{Patterns that differ from common practices—include specific examples}
|
||||
```
|
||||
|
||||
For large repos, link to detailed docs instead of embedding: `See docs/TESTING.md for test conventions.`
|
||||
|
||||
## When to Use
|
||||
|
||||
- General coding standards that apply everywhere
|
||||
- Team preferences shared through version control
|
||||
- Project-wide requirements (testing, documentation)
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Minimal by default**: Only what's relevant to *every* task
|
||||
2. **Concise and actionable**: Every line should guide behavior
|
||||
3. **Link, don't embed**: Reference docs instead of copying
|
||||
4. **Keep current**: Update when practices change
|
||||
|
||||
## Anti-patterns
|
||||
|
||||
- **Using both file types**: Having both `copilot-instructions.md` and `AGENTS.md`
|
||||
- **Kitchen sink**: Everything instead of what matters most
|
||||
- **Duplicating docs**: Copying README instead of linking
|
||||
- **Obvious instructions**: Conventions already enforced by linters
|
||||
Reference in New Issue
Block a user