agentleFS
clideyclidey/whodb/.agents/skills/new-graphql-field/SKILL.md

new-graphql-field

Skill5.1k starsChanged 3 days agoApache-2.0View on GitHub

Add a new GraphQL query or mutation end-to-end (schema → resolver → frontend)

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 3 mentionsMar 2026: 8 mentionsApr 2026: 4 mentionsMay 2026: 5 mentionsJun 2026: 6 mentionsJul 2026: 5 mentionsAug 2026: 6 mentionsSep 2026: 6 mentionsOct 2026: 9 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the clidey/whodb repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about clidey/whodb

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

See all 60

Talked about on GitHub, Bluesky and Hacker News (60 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 7

2 more on Bluesky

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use source-first naming for public queries:

    line 13
  2. Very specific:

    If unauthenticated access is an explicit requirement, add the actual root field name to the public-field policy in …

    line 23
  3. Very specific:

    Never authorize by GraphQL operation name.

    line 25
  4. Distinctive:

    Look up the plugin via the source adapter

    line 35
  5. Very specific:

    Call the appropriate PluginFunctions method

    line 36
  6. Very specific:

    Add to PluginFunctions interface in core/src/engine/plugin.go

    line 40
  7. Very specific:

    Add defaults in core/src/plugins/gorm/ and core/src/engine/base_plugin.go (return errors.ErrUnsupported if not universally applicable)

    line 41
  8. Very specific:

    If the capability is public, declare it in the source contract (core/src/sourcecatalog/catalog.go)

    line 43
  9. Very specific:

    Add a .graphql file next to the component or in frontend/src/graphql/ (codegen reads src//*.graphql):

    line 46

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

Add a New GraphQL Field

Steps

1. Update Schema

Edit core/graph/schema.graphqls.

Use source-first naming for public queries:

type Query {
    SourceNewFeature(input: SourceObjectRefInput!): SourceNewFeatureResult!
}

Classify every new root field before implementing its resolver:

  • Protected is the default and requires no policy entry.
  • If unauthenticated access is an explicit requirement, add the actual root field name to the public-field policy in core/src/auth/graphql_authorization.go.
  • Never authorize by GraphQL operation name. See .agents/rules/graphql.md.

2. Run Codegen

The agent hook runs cd core && go generate . and cd frontend && pnpm run generate after a .graphqls edit. Without the hook, run both. Backend codegen creates the resolver stubs in *.resolvers.go; frontend codegen reads the schema file, so the backend does not need to be running.

3. Implement Resolver

Fill in the generated stub. Source-first resolvers should:

  • Look up the plugin via the source adapter
  • Call the appropriate PluginFunctions method
  • Return the source-typed result

4. Add Plugin Method (if new capability)

  1. Add to PluginFunctions interface in core/src/engine/plugin.go
  2. Add defaults in core/src/plugins/gorm/ and core/src/engine/base_plugin.go (return errors.ErrUnsupported if not universally applicable)
  3. Implement in relevant plugins
  4. If the capability is public, declare it in the source contract (core/src/sourcecatalog/catalog.go)

5. Create Frontend Operation

Add a .graphql file next to the component or in frontend/src/graphql/ (codegen reads src/**/*.graphql):

query SourceNewFeature($input: SourceObjectRefInput!) {
  SourceNewFeature(input: $input) {
    ...fields
  }
}

Then run cd frontend && pnpm run generate to get the typed hook (the hook does not run for .graphql operation files).

6. Use in Component

import { useSourceNewFeatureQuery } from '@graphql';

const { data, loading } = useSourceNewFeatureQuery({ variables: { input } });

7. Verification

cd core && go build ./cmd/whodb && go vet ./...
cd frontend && pnpm run build:ce

For public fields or authorization-sensitive changes, add a regression that uses a misleading public-looking operation name with a protected selected field and proves the operation is rejected before resolver execution.

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.