Repository navigation
Conversation
ctawiah
added this pull request to stack #955
October 22, 2026 22:19
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 00:13
5e03319 to
ee136c2
Compare
ctawiah
removed this pull request from stack #955
October 23, 2026 00:15
ctawiah
added this pull request to stack #960
October 23, 2026 00:16
This was referenced Oct 23, 2026
ctawiah
marked this pull request as ready for review
October 23, 2026 14:11
ctawiah
requested review from
nkester-ld and
wchieng
and removed request for
a team
October 23, 2026 14:11
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 14:27
ee136c2 to
7e87ae4
Compare
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 14:40
7e87ae4 to
b380be3
Compare
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
2 times, most recently
from
October 23, 2026 14:56
036e3a4 to
e03810e
Compare
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 17:07
e03810e to
a416640
Compare
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 21:17
a416640 to
e64f4f3
Compare
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 21:26
e64f4f3 to
f867cf6
Compare
sync tools add takes --json-schema and --description, and sync skills add takes --content, --name, and --description. A content flag turns the add into a create. Both commands get --yes, which skips the confirmation of a create. The command builds the create input only from flags that the command line sets. The errors for a missing tool or skill now name the command that creates it. A missing resource without a content flag names the add with its create flags. A tool or skill file without upsert names the sync that creates it after the user adds upsert. AddCommand moves into bootstrap, so that both packages use it. A JSON outcome of a skill create has a create object with the name that sync sent and its source: flag, frontMatter, or key.
cursor
Bot
force-pushed
the
ctawiah/create-attachment-flags-1e8a
branch
from
October 23, 2026 21:39
f867cf6 to
335233b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The previous PR added the create flow of
sync tools addandsync skills addbehindAddAction.Create. This PR adds the flags, the help, and the messages that name the create command.In #940, a reviewer asked that the errors for a missing tool or skill name the command that creates it. At that time, no such command existed. This PR adds the command to those errors.
What changes
sync tools addgets--json-schemaand--description.sync skills addgets--content,--name, and--description. Both get--yes. A content flag turns the add into a create. The command builds the create input only from flags that the command line sets.sync tools addandsync skills adddescribes both forms, and has an example of a create without prompting. The help ofsync toolsandsync skillsnames the add.createobject, with the name that sync sent and its source:flag,frontMatter, orkey. A skill that a normal sync creates from a hand-written file reports it in the same way.{ "resourceKind": "skill", "projectKey": "demo", "lookupKey": "handoff", "action": "create_server", "status": "succeeded", "version": 1, "create": { "name": "Handoff", "nameSource": "key" } }Design notes
sync toolsalso starts this add in a repository without sync files, and that command has no--json-schema.add --json-schemarefuses a tool that already has a file. So the error for a file without upsert names the sync that creates the tool after the user adds upsert.AddCommandmoves frompromptintobootstrap, so that the add hint and the existing filter errors share it.nameSourceis an unexported field of a plan row.planAttachmentsetsfrontMatterorkeyfrom the file. Only the create knows about--name, so it setsflag. It carries the value to the row that it applies, because the new file always hasname:.Review focus
Verification
go test ./...andgolangci-lint run(v2.9.0) pass.plan_test.go,execute_test.go,bootstrap/attachments_test.go,create_test.go, andacceptance_test.gofailed before the change and pass now.TestCreateMakesASkillFromFlagschecks thecreateobject forkeyandflag, andTestSyncReportsTheNameOfASkillThatItCreatesFromAFilechecks it forfrontMatterandkey. The first test fails when the create does not carry the name source to the applied row.scope_test.gochecks the new flags. It also checks that the create input comes only from flags that the command line sets, also when a flag has an empty value.ldcliand ran a flag-only script against a stand-in for the LaunchDarkly API:--yes, and--yes--nameunknown error occurred.maindoes the same for any failed apply, so the fix is tracked separately.Related changes
This stack builds on #937 to #941, which are merged.
ctawiah/fix-prompt-tool-diff-5b1c)ctawiah/plan-referenced-attachments-1e8a)ctawiah/keep-unused-attachments-1e8a)ctawiah/add-attachments-1e8a)ctawiah/route-scopes-1e8a)ctawiah/scope-commands-1e8a)ctawiah/create-attachments-1e8a)ctawiah/create-attachment-flags-1e8a)ctawiah/share-variation-selection-1e8a)ctawiah/create-variations-1e8a)ctawiah/create-variation-flags-1e8a)Note
Overview
sync tools addandsync skills addnow support creating resources via CLI flags, not only adopting existing LaunchDarkly tools/skills.Setting
--json-schema(tools) or--content(skills) switches add into create mode; tools also get--description, skills get--nameand--description, and both get--yes. Create input is built only from flags the user actually set on the command line (empty values still count). Help text and examples describe adopt vs create.When a tool or skill is missing, errors point users at the right fix: run
sync … addwith the create flags, or addupsertto a local file and runsync tools/sync skills.AddCommandmoves tobootstrapfor shared hints. JSON outcomes for skill creates include acreateobject withnameandnameSource(flag,frontMatter, orkey).Reviewed by Cursor Bugbot for commit 335233b. Bugbot is set up for automated code reviews on this repo. Configure here.