agentleFS
Agentic-Engineering-AgencyAgentic-Engineering-Agency/agentforge/.agents/skills/convex-function-creator/SKILL.md

convex-function-creator

Skill4 starsChanged 9 months agoApache-2.0Archived repositoryView on GitHub

Create Convex queries, mutations, actions, and internal functions with validators, auth checks, async safety, and correct runtime boundaries.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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. Distinctive:

    Use this when writing or reviewing Convex functions.

    line 12
  2. Distinctive:

    Use auth and authorization checks for protected data.

    line 18
  3. Very specific:

    Use internal.* for scheduler and backend-only flows.

    line 19
  4. Distinctive:

    Keep wrappers thin and move reusable logic into plain TypeScript helpers.

    line 20
  5. Very specific:

    Prefer .withIndex() over .filter() for primary lookups.

    line 30
  6. Very specific:

    Avoid unbounded .collect() when pagination is the real requirement.

    line 31
  7. Very specific:

    Never use Date.now() in queries.

    line 32
  8. Distinctive:

    Read function-patterns.md for templates and anti-patterns.

    line 36

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

Convex Function Creator

Use this when writing or reviewing Convex functions.

Default requirements

  • Public functions should define args and returns.
  • Await all promises.
  • Use auth and authorization checks for protected data.
  • Use internal.* for scheduler and backend-only flows.
  • Keep wrappers thin and move reusable logic into plain TypeScript helpers.

Runtime boundaries

  • Queries and mutations stay in the default Convex runtime.
  • "use node" files may contain only actions and helper logic for actions.
  • In AgentForge, actions are still not the place for Mastra runtime orchestration.

Query design

  • Prefer .withIndex() over .filter() for primary lookups.
  • Avoid unbounded .collect() when pagination is the real requirement.
  • Never use Date.now() in queries.

References

  • Read function-patterns.md for templates and anti-patterns.

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.