agentleFS
emmanuelperuemmanuelperu/microcks-skills/skills/microcks-local-server/SKILL.md

microcks-local-server

Skill4 starsChanged 9 months agoApache-2.0View on GitHub

Start a local Microcks server with Docker Compose for API mocking and testing. Use when a developer needs to run Microcks locally to mock REST APIs from OpenAPI specifications. Microcks is a CNCF open-source tool for API mocking and testing.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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
  1. Very specific:

    Create a mocking/ directory at the project root (if it doesn't exist):

    line 23
  2. Distinctive:

    Wait for Microcks to be ready:

    line 45
  3. Very specific:

    When confirming the server is running, ALWAYS remind the user they can stop it by asking "stop the Microcks server" or by running docker …

    line 63
  4. Very specific:

    Port conflict: if port 8080 is already in use, change the mapping in docker-compose.yml (e.g.

    line 102
  5. Very specific:

    Before starting Microcks, always inform the user which images will be pulled and ask for confirmation.

    line 107

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

Microcks Local Server

Set up and run a local Microcks server using Docker Compose for API mocking and testing.

When to Use

  • A developer wants to mock a REST API locally from an OpenAPI specification
  • A project needs a local API mock server for development or integration testing
  • Someone asks to "start Microcks", "run a mock server", or "set up API mocking"

Prerequisites

  • Docker and Docker Compose installed and running

Start the Server

  1. Create a mocking/ directory at the project root (if it doesn't exist):
mkdir -p mocking
  1. Copy the Docker Compose template from templates/docker-compose.yml into it:
cp templates/docker-compose.yml mocking/docker-compose.yml
  1. Start the containers:
# From the project root
docker compose -f mocking/docker-compose.yml up -d

# Or from the mocking/ directory
cd mocking && docker compose up -d
  1. Wait for Microcks to be ready:
until curl -s -o /dev/null http://localhost:8080/api; do
  echo "Waiting for Microcks to be up..."
  sleep 3
done
echo "Microcks is ready!"

Verify the Server

  • Health check: curl -s http://localhost:8080/api
  • Web console: open http://localhost:8080 in a browser
  • List services: curl -s http://localhost:8080/api/services

Stop the Server

When confirming the server is running, ALWAYS remind the user they can stop it by asking "stop the Microcks server" or by running docker compose -f mocking/docker-compose.yml down.

# From the project root
docker compose -f mocking/docker-compose.yml down

# Or from the mocking/ directory
cd mocking && docker compose down

Configuration Details

SettingValueNotes
Microcks imagequay.io/microcks/microcks:1.13.2Pinned stable version
MongoDB imagemongo:7.0LTS version
Microcks port8080REST API and web console
MongoDB port27017Exposed for debugging, not required
AuthenticationDisabledKEYCLOAK_ENABLED=false, no login needed
StorageEphemeralData is lost when containers stop

Tips

  • Ephemeral storage by default: MongoDB uses a tmpfs mount for /data/db — all data is stored in memory and lost on docker compose down. This is intentional for a dev/test workflow where mocks are recreated from specs.
  • To persist data across restarts, replace the tmpfs with a named volume:
services:
  mongo:
    image: mongo:7.0
    container_name: microcks-db
    ports:
      - "27017:27017"
    volumes:
      - microcks-mongo-data:/data/db
volumes:
  microcks-mongo-data:
  • Port conflict: if port 8080 is already in use, change the mapping in docker-compose.yml (e.g. 9080:8080) and adjust all URLs accordingly.

Security Notice

This skill pulls and runs Docker containers from external registries. Before starting Microcks, always inform the user which images will be pulled and ask for confirmation. Never run docker compose up without explicit user approval.

Image Sources

Complementary Skill

For help writing quality OpenAPI specifications, consider installing the openapi-spec-generation skill:

npx skills add https://github.com/wshobson/agents --skill openapi-spec-generation

Download now (ZIP)

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.