agentleFS
KotlinKotlin/kotlinx-rpc/.claude/skills/interacting_with_project_runtime/SKILL.md

interacting_with_project_runtime

Skill1.1k starsChanged 5 days agoApache-2.0View on GitHub

Provides a persistent, project-aware Kotlin REPL for rapid logic verification and prototyping within the project's JVM classpath; use for testing dynamic behavior, prototyping snippets, or rendering Compose UI previews. Do NOT use for exploring library APIs (prefer `searching_dependency_sources`) or running Gradle builds.

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 5 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    ALWAYS: prefer reading source code via search_dependency_sources and read_dependency_sources for exploring unfamiliar library APIs.

    line 19
  2. Very specific:

    ALWAYS: use kotlin_repl instead of a standalone Kotlin REPL for project-aware interaction.

    line 20
  3. Very specific:

    ALWAYS: start a REPL session with the correct projectPath and sourceSet (e.g., main, test).

    line 22
  4. Very specific:

    ALWAYS: use the responder API for rich output (images, markdown) to improve diagnostic visibility.

    line 24
  5. Very specific:

    NEVER: leave a REPL session running indefinitely.

    line 25
  6. Very specific:

    ALWAYS use project-aware REPL: Only the kotlin_repl tool provides full access to the project's exact classpath, dependencies, and source …

    line 31
  7. Very specific:

    Identify the environment: When starting a session, ALWAYS ensure you select the appropriate projectPath (e.g., :app) and sourceSet (e.g., …

    line 32
  8. Very specific:

    Utilize the responder: ALWAYS use responder.render(value) or specialized methods (markdown, image, html) to return rich content.

    line 34
  9. Distinctive:

    Import necessary classes: ALWAYS provide explicit imports for project-specific and library classes.

    line 35
  10. Very specific:

    Use envSource: SHELL if environment variables are missing: If the REPL fails to find expected environment variables (e.g., JAVA_HOME or …

    line 36
  11. Very specific:

    Resolve {baseDir} manually: If your environment does not automatically resolve the {baseDir} placeholder in reference links, treat it as …

    line 38
  12. Distinctive:

    Rapid Logic Verification: When you need to quickly test a function, algorithm, or class behavior without the overhead of writing a full …

    line 42
  13. Distinctive:

    Interactive Prototyping: When you want to experiment with a snippet of logic within the exact context of your project's dependencies and …

    line 43
  14. Distinctive:

    Visual Component Auditing: When iterating on UI components (e.g., Compose) and you need to see the result instantly by rendering them to …

    line 44
  15. Distinctive:

    Dynamic State & Data Probing: When you need to perform one-off data transformations or queries using your project's existing utility …

    line 45
  16. Very specific:

    Use kotlin_repl(command="run") with your Kotlin code.

    line 57
  17. Very specific:

    Use responder.render() for rich diagnostics.

    line 58
  18. Very specific:

    Use kotlin_repl(command="stop") once your investigation is complete to release system resources.

    line 63
  19. Very specific:

    ClassNotFoundException: Ensure the project has been built at least once and that you have selected the correct sourceSet (e.g., test if the …

    line 102
  20. Very specific:

    Changes Not Reflected: If your code changes aren't appearing, stop and start the REPL to refresh the classpath.

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Authoritative Project Runtime & Source Interaction

Probes project logic, tests utility functions, and interacts with the JVM runtime of your source sets with absolute precision using a project-aware REPL.

Constitution

  • ALWAYS prefer reading source code via search_dependency_sources and read_dependency_sources for exploring unfamiliar library APIs.
  • ALWAYS use kotlin_repl instead of a standalone Kotlin REPL for project-aware interaction.
  • ALWAYS provide absolute paths for projectRoot.
  • ALWAYS start a REPL session with the correct projectPath and sourceSet (e.g., main, test).
  • ALWAYS restart the REPL (stop then start) after modifying project source code to pick up changes in the classpath.
  • ALWAYS use the responder API for rich output (images, markdown) to improve diagnostic visibility.
  • NEVER leave a REPL session running indefinitely; use stop when finished.

Directives

  • Read the source first: For exploring unfamiliar library APIs or internal project utilities, ALWAYS prefer reading the source code first. It provides complete context, implementation details, and documentation that a REPL cannot easily expose. Use search_dependency_sources to find definitions and read_dependency_sources to analyze them.
  • ALWAYS use project-aware REPL: Only the kotlin_repl tool provides full access to the project's exact classpath, dependencies, and source sets. NEVER attempt to use standalone runners for project-internal logic.
  • Identify the environment: When starting a session, ALWAYS ensure you select the appropriate projectPath (e.g., :app) and sourceSet (e.g., main for application code, test for test utility access).
  • Pick up source changes: The REPL uses a static snapshot of the classpath. If you change project code, you MUST stop and then start the session again to pick up the updated classes.
  • Utilize the responder: ALWAYS use responder.render(value) or specialized methods (markdown, image, html) to return rich content.
  • Import necessary classes: ALWAYS provide explicit imports for project-specific and library classes.
  • Use envSource: SHELL if environment variables are missing: If the REPL fails to find expected environment variables (e.g., JAVA_HOME or specific JDKs), it may be because the host process started before the shell environment was fully loaded. Set env: { envSource: "SHELL" } when calling start to force a new shell process to query the environment.
  • Resolve {baseDir} manually: If your environment does not automatically resolve the {baseDir} placeholder in reference links, treat it as the absolute path to the directory containing this SKILL.md file.

When to Use

  • Rapid Logic Verification: When you need to quickly test a function, algorithm, or class behavior without the overhead of writing a full test suite.
  • Interactive Prototyping: When you want to experiment with a snippet of logic within the exact context of your project's dependencies and JVM configuration before implementing it.
  • Visual Component Auditing: When iterating on UI components (e.g., Compose) and you need to see the result instantly by rendering them to images.
  • Dynamic State & Data Probing: When you need to perform one-off data transformations or queries using your project's existing utility classes.

Workflows

Starting an Authoritative Session

  1. Identify the project module (e.g., :app) and source set (e.g., main).
  2. Call kotlin_repl(command="start").
  3. Optionally provide env for environment variables or additionalDependencies if you need external libraries not currently in the project.

Probing Code & State

  1. Use kotlin_repl(command="run") with your Kotlin code.
  2. Use responder.render() for rich diagnostics.
  3. Review the returned text or image content.

Lifecycle Management

  1. Use kotlin_repl(command="stop") once your investigation is complete to release system resources.

Examples

Probing a project utility function

// Start the session
{
  "command": "start",
  "projectPath": ":my-project",
  "sourceSet": "main"
}

// Execute the probe
{
  "command": "run",
  "code": "import com.example.utils.MyHelper\nMyHelper.calculateSum(1, 2)"
}
// Reasoning: Using kotlin_repl to verify a utility function in the context of the main source set.

Visualizing a UI Component

import androidx.compose.ui.test.*
import com.example.ui.MyComposable

runComposeUiTest {
    setContent { MyComposable() }
    val bitmap = onRoot().captureToImage()
    responder.render(bitmap)
}
// Reasoning: Using the responder API to retrieve a high-resolution image of a Compose component.

Troubleshooting

  • REPL Not Started: You must call start successfully before calling run.
  • ClassNotFoundException: Ensure the project has been built at least once and that you have selected the correct sourceSet (e.g., test if the class is in src/test/kotlin).
  • Changes Not Reflected: If your code changes aren't appearing, stop and start the REPL to refresh the classpath.

Download now (ZIP)

Trending

Quiet since September.about the whole repository

Dec 2025: 2 mentionsJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 2 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Kotlin/kotlinx-rpc repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about Kotlin/kotlinx-rpc

The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 16

Talked about on GitHub (16 times).

On GitHub · 16

11 more on GitHub

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.