Strategy files use Markdown with YAML frontmatter.
Recommended extension:
.strategy.md
The body after the second --- is the Strategy user prompt body.
---
schema: everywhere.strategy/v1
id: user.example
name: "Example"
---
Prompt body here.One file defines one Strategy. Multiple Strategies in one file are not supported.
YAML implementation choice:
- Use SharpYaml for frontmatter serialization/deserialization.
- Prefer source-generated metadata where practical.
- Do not support comment-preserving roundtrip in v1.
- Strategy Editor may rewrite frontmatter into canonical formatting.
- User-authored comments in frontmatter are not part of the supported file contract.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
schema |
string | No | everywhere.strategy/v1 |
Strategy schema version. |
id |
string | No | provider-derived | Stable Strategy ID. |
from |
string or object | No | null | Single source to derive from. |
enabled |
bool | No | true | Whether this Strategy participates in matching. |
name |
string | Yes after normalization | source/provider-derived | Display name. |
description |
string | No | null | Tooltip/subtitle. |
icon |
string | No | null | Icon identifier, preferably Lucide icon name. |
priority |
int | No | 0 | Higher appears earlier. |
when |
condition object | No | true | Recommendation condition. |
tools |
map string -> map string -> bool | No | null | ToolPatternRulesets override for this Strategy. |
preprocessors |
string[] | No | [] | Predefined preprocessors to run at execution. |
systemPrompt |
string | No | null | System prompt override for this request. |
options |
object | No | defaults | Matching/runtime options. |
| body | markdown | No | null/source body | User prompt body. |
name is required after from resolution. A raw file may omit name if its from source provides one.
from derives the current Strategy from one source.
Short form:
from: ./SKILL.mdExpanded form:
from:
source: ./SKILL.md
kind: autoAllowed kind values:
auto
skill
strategy
markdown
url
Rules:
- Only one
fromis allowed. fromis include-like: final output may look merged, but the source reference is preserved.- Current frontmatter fields replace source fields.
- Current body replaces source body if a body section is present.
- If current body section is absent, source body is inherited.
- Multiple inheritance is not supported.
- Nested
fromshould be rejected in v1. - Diagnostics should retain both current source and included source when possible.
Examples:
from: skill://everywhere.my-writing-stylefrom:
source: E:\Everywhere\Strategies\BaseReview.strategy.md
kind: strategyfrom:
source: https://example.com/strategies/research.strategy.md
kind: urlURL support is interface-ready. A v1 implementation may reject URL loading unless a network resolver is explicitly enabled.
Examples:
id: user.file-manager.summarize-selectionid: workspace.review-current-fileRules:
- IDs are stable and case-insensitive.
builtinis a namespace assigned by the builtin provider, not by user-authored files.- User files cannot allocate themselves into
builtin.*. - If a user file writes
id: builtin.foo, prefer rejecting it with a validation diagnostic. - If omitted, user provider may derive ID from relative path.
- Duplicate IDs within one provider namespace are invalid.
- User Strategies do not override builtin Strategies.
enabled: trueDisabled Strategies are loaded for editing/diagnostics but skipped during matching.
name: "Summarize selected files"
description: "Summarize files selected in the file manager"
icon: FileText
priority: 80icon should initially use names that map to existing app icon support, preferably Lucide icon names. Invalid icons should fall back to a default icon and produce a validation warning.
when controls whether a Strategy is recommended.
If absent:
when: trueExplicit true/false:
when: truewhen: falseComposite conditions:
when:
all:
- attachments.selection.text:
length:
min: 1
- none:
- clipboard.text:
contains: "secret"Supported composite operators:
all
any
none
All conditions evaluate to bool?, and only root true recommends the Strategy.
A path condition maps a context path to an operator object.
when:
all:
- extra.file_manager.selection.items:
count:
min: 1Supported root paths:
attachments
visual
clipboard
assistant
environment
extra
Examples:
environment.os:
equals: "windows"extra.browser.active_tab.url:
startsWith: "https://arxiv.org/"attachments.selection.text:
regex: "\\bTODO\\b"Full set:
equals: "value"
in: ["a", "b"]
contains: "value"
startsWith: "prefix"
endsWith: "suffix"
regex: "pattern"
glob: "*.pdf"
caseSensitive: trueRules:
- Default string comparison is case-insensitive.
caseSensitive: truemakes supported string operations case-sensitive.- Regex uses
options.regexTimeout. - Regex timeout evaluates to
null.
String length:
attachments.selection.text:
length:
min: 1
max: 5000Array count:
extra.file_manager.selection.items:
count:
min: 1
max: 20Numeric:
extra.file_manager.selection.items:
any:
size:
max: 10485760Supported numeric shape:
min: 0
max: 100
equals: 5Array any:
extra.file_manager.selection.items:
any:
extension:
in: [".pdf", ".docx", ".txt"]Array all:
extra.file_manager.selection.items:
all:
kind:
equals: "file"Array none:
extra.file_manager.selection.items:
none:
extension:
in: [".exe", ".bat", ".cmd", ".ps1"]Inside array operators, paths are relative to each item.
Recommended v1 paths:
attachments.files
attachments.files[].path
attachments.files[].mimeType
attachments.files[].extension
attachments.selection.text
attachments.text
attachments.visual.items
attachments.visual.items contains visual attachments in input order. Use collection operators to express which items or how many items are required.
Examples:
attachments.files:
count:
min: 1attachments.files:
any:
extension:
equals: ".png"Require one or more visual attachments:
attachments.visual.items:
count:
min: 1Require exactly one visual attachment when the operation only supports one input:
attachments.visual.items:
count:
min: 1
max: 1Preprocessors validate their input requirements again against the execution snapshot when the user sends the request.
Recommended v1 paths:
clipboard.text
clipboard.hasText
clipboard.hasImage
clipboard.files
Example:
clipboard.text:
length:
min: 1Clipboard paths can be read before matching. The Strategy details UI should disclose clipboard access.
Recommended v1 paths:
assistant.id
assistant.name
assistant.model.id
assistant.model.modalities
assistant.model.supportsToolCall
Example:
assistant.model.modalities:
contains: "image"Recommended v1 paths:
environment.os
environment.architecture
environment.locale
environment.timeZone
environment.currentDate
Example:
environment.os:
in: ["windows", "macos"]extra is the user-facing namespace for context collected by extra providers.
Public schema:
extra.file_manager.current_folder.path
extra.file_manager.current_folder.displayName
extra.file_manager.selection.items
extra.file_manager.selection.items[].path
extra.file_manager.selection.items[].displayName
extra.file_manager.selection.items[].kind
extra.file_manager.selection.items[].extension
extra.file_manager.selection.items[].size
Example:
extra.file_manager.selection.items:
any:
extension:
in: [".pdf", ".docx"]Recommended future schema:
extra.browser.active_tab.url
extra.browser.active_tab.title
extra.browser.active_tab.domain
Example:
extra.browser.active_tab.url:
startsWith: "https://arxiv.org/"Recommended future schema:
extra.workspace.root
extra.workspace.name
extra.workspace.git.branch
extra.workspace.git.hasChanges
v1 visual condition types:
visual.exists
visual.count
visual.match
visual.exists:
query: "//TopLevel//Button[@name='Save']"Returns true if at least one element matches.
visual.count:
query: "//ListViewItem[@selected=true]"
min: 1
max: 5Returns true if the count is within range.
visual.match:
query: "//TopLevel/@name"
contains: "Visual Studio"The query must select attribute values. The rest of the object uses normal string/numeric/bool operators.
Visual queries use all applicable attachment contexts. Attachment-relative queries start at each live visual attachment; root-scoped queries use distinct attachment-derived roots. Results are combined with element deduplication: visual.exists tests for any match, visual.count counts distinct elements, and visual.match tests selected values across the result. Ordering, budgets, and unavailable-context behavior follow Matching System, Visual Query Conditions.
Supported examples:
//Button
/TopLevel/Panel/Button
.//TextEdit[@focused=true]
//TopLevel/@name
//ListViewItem[@selected=true]
//Button[contains(@name,'Save')]
//Document[matches(@text,'error|warning')]
Supported concepts:
| Syntax | Meaning |
|---|---|
//Type |
Descendant search by visual element type. |
/ |
Strict parent-child step. |
. |
Current query context node; an attachment-relative query starts at each live visual attachment. |
* |
Any element type. |
@name |
Name attribute. |
@text |
Text content, read only when explicitly requested. |
@process |
Owning process name. |
@selected |
Selected state. |
@focused |
Focused state. |
@disabled |
Disabled state. |
@readonly |
Read-only state. |
@offscreen |
Offscreen state. |
@password |
Password state. |
@bounds.x |
Bounds X. |
@bounds.y |
Bounds Y. |
@bounds.width |
Bounds width. |
@bounds.height |
Bounds height. |
contains(@name,'x') |
String contains. |
matches(@text,'regex') |
Regex match. |
@focused reads a visual element's platform-reported focus state and can be used as a query filter.
Not supported in v1:
- XPath axes.
- Namespaces.
- Arbitrary functions.
- Arithmetic expressions.
- Index selectors such as
//Button[3]. - Platform-specific fields such as AutomationId/ClassName.
tools uses the nested ToolPatternRulesets format.
tools:
builtin.web:
"*": true
web_search: false
builtin.file_system:
read_file: trueOuter keys are plugin-key glob patterns. Inner keys are function-name glob patterns, and inner values are booleans.
preprocessors:
- selected-text
- file-manager-selectionRules:
- IDs must refer to registered preprocessors.
- Preprocessors run in the declared order.
- Unknown IDs are validation errors.
- v1 preprocessors return variables only.
- Prompt variables use path-style names.
Short form:
systemPrompt: "You are an expert translator."Block form:
systemPrompt: |
You are an expert translator.
Preserve formatting when possible.It supports the same variable interpolation as body.
All runtime options live under options.
options:
matchingTimeout: 300ms
conditionTimeout: 80ms
regexTimeout: 50ms
visualQueryTimeout: 120ms
extraTimeout: 200msRecommended defaults:
| Field | Default | Meaning |
|---|---|---|
matchingTimeout |
300ms |
Total budget for evaluating one Strategy. |
conditionTimeout |
80ms |
Budget for one condition node. |
regexTimeout |
50ms |
Budget for one regex operation. |
visualQueryTimeout |
120ms |
Budget for one visual query. |
extraTimeout |
200ms |
Budget for one extra provider call. |
Durations support:
ms
s
Invalid durations are validation errors.
The markdown body is the user prompt template.
Please explain the selected text:
{attachments.selection.text}Variable rules:
- Syntax is
{path.to.value}. {Argument}remains supported for compatibility.- New variables should use path style.
- Missing values render as empty string in user-facing execution.
- Diagnostics should report missing values by path.
---
schema: everywhere.strategy/v1
id: user.file-manager.summarize-selection
name: "Summarize selected files"
description: "Summarize files selected in the file manager"
icon: FileText
priority: 80
when:
all:
- extra.file_manager.selection.items:
count:
min: 1
- extra.file_manager.selection.items:
any:
extension:
in: [".pdf", ".docx", ".txt", ".md"]
tools:
builtin.filesystem.read_file: true
builtin.web.*: false
preprocessors:
- file-manager-selection
options:
matchingTimeout: 300ms
conditionTimeout: 80ms
regexTimeout: 50ms
visualQueryTimeout: 120ms
extraTimeout: 200ms
---
Please summarize the selected files:
{extra.file_manager.selection.items}---
schema: everywhere.strategy/v1
id: user.browser.arxiv-summary
name: "Summarize arXiv paper"
description: "Summarize the currently open arXiv paper"
icon: FileText
priority: 90
when:
all:
- extra.browser.active_tab.url:
startsWith: "https://arxiv.org/"
preprocessors:
- browser-active-page
tools:
builtin.web.*: true
---
Summarize this arXiv paper:
URL: {extra.browser.active_tab.url}
Readable text:
{preprocess.browser.readable_text}---
schema: everywhere.strategy/v1
id: user.writing.polite-rewrite
from: ./SKILL.md
name: "Polite rewrite"
description: "Rewrite selected text using my writing rules"
icon: PenLine
priority: 60
when:
all:
- attachments.selection.text:
length:
min: 1
---
Please rewrite this text politely and concisely:
{attachments.selection.text}Because the body is present, it replaces the body loaded from SKILL.md. Other fields from the source are replaced by current fields when present.
---
schema: everywhere.strategy/v1
id: user.ide.explain-focused-editor
name: "Explain focused editor"
description: "Explain text in the focused editor"
icon: MessageSquareCode
priority: 70
when:
all:
- visual.exists:
query: ".//TextEdit[@focused=true]"
- visual.match:
query: "//TopLevel/@name"
contains: "Visual Studio"
---
Explain the current focused editor content:
{attachments.selection.text}An implementation must validate:
- Frontmatter exists or file is a valid imported markdown source.
- YAML parses.
schemais supported.idis valid or derivable.- User ID does not use
builtin.. fromhas one source and no unsupported nested inheritance.enabledis bool.priorityis int.whenuses supported structure.- Visual query syntax is valid.
toolsis map string -> bool.preprocessorsis string array and IDs exist when registry is known.optionsdurations are valid.- Body is valid UTF-8/UTF-16 text depending on file encoding support.