mcp-steroid / prompts
AGENTS.md82 starsChanged 3 months agoApache-2.0View on GitHub
This guide explains the prompt file format, build-time processing, and IDE-conditional content system. Read docs/PHILOSOPHY.md first (canonical) or mcp-steroid://skill/design-philosophy (runtime mirror). Prompt edits are the primary lever for "agents deliver more" under Tenet 2 — every change in this folder either teaches the agent an IntelliJ API directly or routes it to one. New McpScriptContext helpers and new steroid_* tools are last-resort, not the default response to a recipe gap. Core goal: Promote IntelliJ where it makes a difference. IntelliJ…
1 other project uses a version of this.
Adopted by
Most recently taken up by
- jonnyzzz/mcp-steroidword for word, first seen Aug 5, 2026
Other versions1 project uses a version of this.
Word for word · 1
- jonnyzzz/mcp-steroid★ 78100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- test-integration/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- ij-plugin/CLAUDE.mdCLAUDE.md
- installer-gen/CLAUDE.mdCLAUDE.md
- test-experiments/CLAUDE.mdCLAUDE.md
- test-integration-agent-launch/CLAUDE.mdCLAUDE.md
- website/CLAUDE.mdCLAUDE.md
- website-gen/CLAUDE.mdCLAUDE.md
- promptSkill
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
NOT teach agents to expect new context methods, and prompt authors must NOT request a new context method to make a recipe shorter.
- Distinctive: line 59
NOT request a new context method to make a recipe shorter.
- Very specific: line 65
All prompt .md files live under prompts/src/main/prompts/.
- Very specific: line 70
Every article .md file follows this structure:
- Very specific: line 89
No bare Kotlin/Java code outside
kotlinor bare ` fences (no other language tags — testNoNonKotlinFences rejects every annotated fence … - Very specific: line 129
If code doesn't compile (pseudo-code, undefined vars, plugin-specific APIs not on classpath), use a bare ``
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prompts Module — Writing & Editing Prompt Files
This guide explains the prompt file format, build-time processing, and IDE-conditional content system.
Read
docs/PHILOSOPHY.mdfirst (canonical) ormcp-steroid://skill/design-philosophy(runtime mirror). Prompt edits are the primary lever for "agents deliver more" under Tenet 2 — every change in this folder either teaches the agent an IntelliJ API directly or routes it to one. NewMcpScriptContexthelpers and newsteroid_*tools are last-resort, not the default response to a recipe gap.
Prompt Content Principles
Core goal: Promote IntelliJ where it makes a difference.
IntelliJ MCP Steroid's unique value is IDE-level intelligence: code navigation, PSI tree access, refactoring, compilation, test execution, indexing. Prompts must steer agents toward these APIs.
Use IntelliJ for:
- Finding files →
FilenameIndex.getVirtualFilesByName()(O(1) indexed lookup) - Class lookup →
JavaPsiFacade.findClass(),KotlinShortNamesCache - Find usages →
ReferencesSearch.search() - Running Maven/Gradle builds →
MavenRunner,ExternalSystemUtil.runTask() - Compilation feedback →
ProblemHighlightFilter, compiler errors via IDE - Navigation → PSI,
GotoDeclarationHandler,DefinitionsScopedSearch
Do NOT use IntelliJ (steroid_execute_code) for:
- Reading file content as a one-shot read with no follow-up edit or
semantic query → the MCP
Readtool is shorter. Caveat: if the same script also writes the file, runs an inspection, or walks PSI for that file, keep both insidesteroid_execute_code(String(vf.contentsToByteArray(), vf.charset)) — the runtime guides inmcp-steroid-info.mdandmcp-steroid://skill/execute-code-tool-descriptioncall this out explicitly because mixing nativeRead+ IDE-side edits leaves PSI stale. - Listing files purely for shell-style display → the MCP
Globtool is shorter. For anything index-driven or scope-aware (getAllFilesByExt,getVirtualFilesByName,projectScope), stay insidesteroid_execute_code— the index is canonical. - Running arbitrary processes → avoid process spawning from within the IDE JVM entirely
- Checking Docker socket →
java.io.File("/var/run/docker.sock").exists()is native Java, no IntelliJ needed - Simple file existence checks →
java.io.File(path).exists()is fine as native Java
ProcessBuilder / GeneralCommandLine ban:
ProcessBuilderis banned in all prompt code examples — it spawns processes from the IDE JVM, bypasses IntelliJ's process management, causes classpath conflicts, and produces token-limit-busting output. Why this is a tenet, not a style preference: aProcessBuildersnippet teaches the agent that shell-out is the answer; the next time it sees a similar problem it'll reach forProcessBuilderagain instead of the IntelliJ idiom. Recipes ship transferable skills.GeneralCommandLine(IntelliJ wrapper for external processes) is also discouraged for cases where native Java APIs exist (file checks, socket checks). UseGeneralCommandLineonly when an external tool must genuinely be invoked AND no IDE API exists AND no native Java API exists.- Exception:
MavenRunner,ExternalSystemUtil— these are IDE-managed process launchers, not raw process spawns.
McpScriptContext stays narrow. The helpers exposed inside
steroid_execute_code's runtime (see the McpScriptContext source for
the current surface) are the surface, not a growing one. Prompts must
NOT teach agents to expect new context methods, and prompt authors must
NOT request a new context method to make a recipe shorter. The IntelliJ
API is the extension point. See Tenet 3 in PHILOSOPHY.md for the gate
that any new context method has to pass before it ships.
File Format
All prompt .md files live under prompts/src/main/prompts/. They are organized into folders
that map to MCP resource URI prefixes (e.g., ide/ -> mcp-steroid://ide/...).
Article Format (New-Format .md)
Every article .md file follows this structure:
Title ← line 1: plain text, ≤80 chars, no # prefix
← line 2: blank
Short description ← line 3: plain text, ≤200 chars, no # prefix
← line 4: blank
...body content... ← lines 5+: markdown with ```kotlin``` blocks
# See also ← optional section (must be preceded by blank line)
- [Link](mcp-steroid://...)Validation rules (enforced by MarkdownArticleContractTest):
- Title (line 1): non-empty, ≤80 chars, no
#prefix - Line 2: must be blank
- Description (line 3): non-empty, ≤200 chars, no
#prefix - Line 4: must be blank
- No bare Kotlin/Java code outside
```kotlin```or bare```fences (no other language tags —testNoNonKotlinFencesrejects every annotated fence except```kotlin)
Skill Files
Skill files (in skill/) can have YAML frontmatter after the header:
Skill Title
Skill description
---
name: my-skill-name
description: Skill description for MCP prompt listing.
---
# Skill Content
...Build Pipeline
- prompt-generator parses each
.mdfile viaparseNewFormatArticleParts() - Content is split into interleaved markdown/kotlin parts
- Each part is encoded into a generated Kotlin class (content obfuscated with random factors)
- A payload class assembles all parts at runtime via
readPromptInternal(context) - An article class wraps payload + description + see-also
- Compilation tests are generated for each
```kotlin```block
The prompts-api module contains shared base types (PromptBase, ArticleBase, IdeFilter,
PromptsContext, FilteredPart) used by both prompt-generator and the runtime.
Kotlin Code Blocks
Code inside ```kotlin``` fences is:
- Extracted at build time and compiled against the IDE classpath with
-Werror - Wrapped by
CodeButcherwith default imports (no need to importreadAction,writeAction,EDT, etc.) - Served to MCP clients as executable examples
If code doesn't compile (pseudo-code, undefined vars, plugin-specific APIs not on classpath),
use a bare ``` fence (no language tag) instead — bare blocks are treated as plain markdown and
not compiled. Do NOT use ```text``` or any other language tag:
MarkdownArticleContractTest.testNoNonKotlinFences rejects every annotated fence except
```kotlin (with optional [FILTER] annotations).
Escaping ${...} inside steroid_execute_code script strings. A ${...} in a replacement
string passed to VfsUtil.saveText (or any nested Kotlin string literal in an exec_code example)
is interpolated by the OUTER script, not emitted literally. Break the template with a val dollar = "$" indirection — e.g.
"${dollar}{expr}" — so the literal ${...} reaches the patched file.
IDE-Conditional Content
Fence-Level Targeting
Annotate kotlin fences with product codes and/or version constraints:
```kotlin ← no annotation: compiled against all IDEs (IDEA, Rider, CLion)
```kotlin[RD] ← Rider only
```kotlin[IU,RD] ← IDEA and Rider
```kotlin[RD;>=254] ← Rider version 254+
```kotlin[;>=253] ← all IDEs, version 253+Product codes are matched verbatim against the running IDE's ApplicationInfo product code
and are not validated against a fixed list — the JetBrains lineup evolves, so an unknown code is
harmless (it just never matches). Common codes: IU (IDEA Ultimate), IC (IDEA Community),
AI (Android Studio), RD (Rider), CL (CLion), GO (GoLand), PY (PyCharm), WS (WebStorm),
RM (RubyMine), DB (DataGrip). IU, IC and AI are distinct codes: an IntelliJ-family
Java/Kotlin/PSI/SSR/debugger recipe must list all three ([IU,IC,AI]) — [IU] alone reaches only
IDEA Ultimate. Reserve [IU]-only for genuinely Ultimate-bound APIs (e.g. Spring).
Annotated blocks generate per-IDE compilation tests only for matching IDEs. At runtime, annotated blocks are included only when the IDE matches.
Conditional Sections
Use ###_IF_IDE[...]_### directives for IDE-specific markdown sections:
###_IF_IDE[RD]_###
Rider-specific instructions here.
###_ELSE_###
Instructions for all other IDEs.
###_END_IF_###Full syntax supports ###_ELSE_IF_IDE[...]_###:
###_IF_IDE[RD]_###
Rider content
###_ELSE_IF_IDE[CL]_###
CLion content
###_ELSE_###
Everyone else
###_END_IF_###Conditionals must be in the body (lines 5+), never in the title or description.
At build time, conditionals are parsed into ContentPart items with IdeFilter predicates.
The generated payload class checks each part's filter at runtime against PromptsContext.
When context is null (test reads, no-arg readPrompt()), all content is included.
Migration Note
The old ###_IF_RIDER_### syntax is still supported during migration but new files
should use the ###_IF_IDE[RD]_### form.
Special Directives
###_NO_AUTO_TOC_###or###_EXCLUDE_FROM_AUTO_TOC_###— excludes the article from the auto-generated folder TOC and from sibling see-also links. Place on its own line in the body.
Testing
Build-time tests (generated into prompts/build/generated/kotlin-test/):
| Test | What it verifies |
{Stem}PromptTest | readPrompt() output matches source file content |
{Stem}PromptArticleReadTest | payload, description, seeAlso are non-empty and readable |
{Stem}KtBlocksCompilationTest | each ```kotlin``` block compiles against IDE classpath |
MarkdownArticleContractTest | title/description format, no bare code outside fences |
KtBlock compilation tests run against up to 3 IDE distributions:
- IDEA (
compileKtBlockOnIdea) — system propertymcp.steroid.ide.home - Rider (
compileKtBlockOnRider) — system propertymcp.steroid.rider.home - CLion (
compileKtBlockOnClion) — system propertymcp.steroid.clion.home
If an IDE distribution is not available, the corresponding test skips gracefully.
Adding a New Prompt
- Create
prompts/src/main/prompts/{folder}/{name}.mdfollowing the article format - Add
```kotlin```blocks for executable examples - Use bare
```fences (no language tag) for non-compilable code —```textis rejected bytestNoNonKotlinFences` - Use
###_IF_IDE[...]_###for IDE-specific sections - Run
./gradlew :prompt-generator:testto verify parsing - Run
./gradlew :prompts:compileKotlinto verify generated code compiles - Run
./gradlew :prompts:testfor full test suite (requires IDE downloads)
Key Source Files
| File | Purpose |
prompt-generator/.../generateArticleClazz.kt | Article parsing, payload class generation |
prompt-generator/.../generatePromptClazzTest.kt | Test generation, extractKotlinBlocks |
prompt-generator/.../FenceMetadata.kt | ```kotlin[...] ` annotation parsing |
prompt-generator/.../ContentPart.kt | Conditional directive parsing, IdeFilter mapping |
prompts-api/.../PromptFactory.kt | PromptBase, ArticleBase base classes |
prompts-api/.../IdeFilter.kt | Composable filter predicates |
prompts-api/.../PromptsContext.kt | Runtime IDE context |
prompts/src/test/.../KtBlockCompilationTestBase.kt | Per-IDE compilation test infrastructure |
prompts/src/test/.../MarkdownArticleContractTest.kt | Format contract validation |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

