add-table
Skill1 starsChanged 23 days agoMITView on GitHub
Add a new table to this ServiceNow app end to end — Fluent Table(), record ACLs, AppService methods, Scripted REST routes, an ATF test and registration. Use when the user asks for a new table, entity, record type or data model in this now-sdk project.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- deploy-and-verifySkill
- add-tableSkill
- deploy-and-verifySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
every column name starts with x_snc_example_.
- Very specific: line 30
If an instance is available, run the deploy-and-verify skill.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Add a table
Work through every step; a table without ACLs, tests or registration is not done. Check property names with
npx now-sdk explain table --format=raw (and acl, restapi, test) rather than guessing.
Names below use widget as the example entity; keep the project's scope prefix (x_snc_example unless npm run setup
changed it — read scope from now.config.json).
- Table — create
src/fluent/tables/widget.now.ts:export const x_snc_example_widget = Table({ name: 'x_snc_example_widget', label, display, schema: { … } })- every column name starts with
x_snc_example_; pick column types fromnpx now-sdk explain --list(*column-api) allowWebServiceAccess: trueonly if the REST Table API must reach itactions: { read: true }(object form; controls cross-scope access — add writes only if another scope needs them)
- ACLs — in
src/fluent/acls/, oneAcl()per operation (read,create,write,delete),type: 'record',table: 'x_snc_example_widget',roles: [exampleUserRole]or[exampleAdminRole]imported from../roles/app-roles.now. - Service — add methods to
src/server/AppService.server.js(or a new Script Include, see AGENTS.md). UseGlideRecordSecure, validate input, return{ status, body }like the existing item methods. Any platform API the template does not already call needs aCrossScopePrivilege(runtime access is enforcing; see AGENTS.md). - REST routes — add routes to
src/fluent/rest-api/app-api.now.ts(/widgets,/widgets/{sys_id}), each with its own$idandenforceAcl: [exampleApiAcl]; scripts only call the service andsvc.send(response, result). - ATF test — add a
Test()tosrc/fluent/tests/that inserts a record, validates it, exercises the service methods viarunServerSideScript(useassertEqual), and add it to theTestSuite. Every step gets a unique$id. - Register —
export * from './tables/widget.now'insrc/fluent/index.now.ts(other files import by side effect). - Verify —
npm run lint && npm run build; commit thesrc/fluent/generated/keys.tschanges with the code. If an instance is available, run thedeploy-and-verifyskill. - Docs — add the table to the "What gets deployed" table in
README.mdand a line under[Unreleased]inCHANGELOG.md.
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
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.

