agentleFS
flisk-shflisk-sh/flisk/.claude/skills/flisk-recipe-ai-agent/SKILL.md

flisk-recipe-ai-agent

Skill49 starsChanged 36 days agoMITView on GitHub

Recipe for "build me an AI agent with MCP tools and a database" with Flisk - an agent service with sessions, an MCP tools server and a backend with a database in one stack, started with `flisk up`. Use with the flisk-build skill when the user asks for an AI agent, chatbot, assistant, MCP server or tools for an agent.

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

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

    Keep the agent on the default session storage (a named volume).

    line 28

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

Recipe: an AI agent with MCP tools and a database

Parts: an agent that keeps a conversation per session, an MCP server with the agent's tools, and a backend that stores the data the tools read and write.

Steps

flisk doctor
flisk project --yes
flisk resource assistant --type agent --stack ai --yes
flisk resource tools-mcp --type mcp --stack ai --yes
flisk resource notes-api --type backend --stack ai --feature drizzle --yes
flisk up ai --dry-run
flisk up ai --json &          # wait for {"ok":true}
flisk networks --stack ai --raw

Keep the agent on the default session storage (a named volume). In Flisk 1.4.2 an agent created with --durability postgres fails its image build (TS7016: Could not find a declaration file for module 'pg'); use the notes-api backend for the database instead.

App code

  • notes-api: a notes table (src/schema.ts) and GET /notes, POST /notes. Keep /health and /health/db.
  • tools-mcp: tools such as list_notes and add_note that call notes-api.
  • assistant: the agent contract is already in place: /health, /ready, POST /turn and GET /session with an x-session-id header. Put the agent's logic in the turn handler. If the user gives a model API key, list its name under secrets.required in service.json and put the value in the project .env.

Done when

Each answers 200 on api.<project>.localhost:<port>: /api/assistant/health, /api/assistant/ready, /api/tools-mcp/health, /api/notes/health, /api/notes/health/db. Then send one turn:

curl -s -X POST -H 'x-session-id: demo' -H 'content-type: application/json' \
  -d '{"input":"hello"}' http://api.<project>.localhost:<port>/api/assistant/turn

Tell the user the three URLs, how to talk to the agent (the curl above), and that flisk agent sessions assistant --session-id demo shows the saved conversation.

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.