OpenParable
Skip to content
← Back to skills

Concurrency Primitives

Development

Concurrency Primitives is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Expert skill for implementing language-level concurrency support including threads, channels, and synchronization

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/programming-languages/skills/concurrency-primitives/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/concurrency-primitives, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Concurrency Primitives Skill

Overview

Expert skill for implementing language-level concurrency support including threads, channels, and synchronization.

Capabilities

  • Design threading API and primitives
  • Implement mutex and condition variables
  • Implement channel-based message passing
  • Design async/await and coroutine systems
  • Implement work-stealing schedulers
  • Handle thread-local storage
  • Design memory model and ordering
  • Implement green threads/goroutines

Target Processes

  • concurrency-primitives.js
  • interpreter-implementation.js
  • bytecode-vm-implementation.js
  • garbage-collector-implementation.js

Dependencies

Concurrency theory, Go scheduler references

Usage Guidelines

  1. Model Choice: Choose between shared memory and message passing based on language goals
  2. Memory Model: Define memory ordering semantics clearly
  3. Scheduling: Design scheduler with fairness and efficiency in mind
  4. Integration: Ensure GC and concurrency work together correctly
  5. Testing: Build concurrency stress tests from the start

Output Schema

{
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "enum": ["shared-memory", "message-passing", "actor", "csp"]
    },
    "primitives": {
      "type": "array",
      "items": { "type": "string" }
    },
    "schedulerType": {
      "type": "string",
      "enum": ["os-threads", "green-threads", "work-stealing", "cooperative"]
    },
    "generatedFiles": {
      "type": "array",
      "items": { "type": "string" }
    }
  }
}