Imported from yingyx/sjtu-user-scripts (
AGENTS.md). Install upstream withnpx skills add yingyx/sjtu-user-scripts. Copyright stays with the author.
Userscript Development Contract
In this repository, “plugin” means a GreasyFork userscript by default. Do not create a browser extension, Codex plugin, or another product type unless the user explicitly requests it.
Natural-language requests
The user only needs to describe the target page and desired behavior. Derive sensible requirements and complete scaffolding, implementation, documentation, validation, and handoff. Ask only when the target page is ambiguous or the feature involves credentials, tracking, advertising, payment, or another material choice.
New-script workflow
- Read
docs/standards.mdcompletely. - Run
npm run new -- --id <kebab-case-id> --name <localized-name> --name-en <English-name> --description <localized-description> --description-en <English-description> --match <URL-pattern>. Repeat--matchfor multiple page patterns. - Implement and remove every
TODO(userscript)in the entry file and README. Do not copy an existing script as a template. - Keep the README accurate about behavior, usage, limitations, privacy, and network requests.
- Declare only the
@match,@grant, and@connectvalues actually used. Never commit secrets, minify or obfuscate the release artifact, or download the primary logic at runtime. - Run
npm run checkand report any target-page smoke tests that still require a human browser session.
New scripts use standardsVersion: 1 in scripts.json and receive strict validation from creation.
Existing-script workflow
- Before editing, read the target script's README, CHANGELOG, and complete
.user.jsentry. - Do not migrate unrelated legacy conventions, and do not change a published script's primary
@nameor@namespacewithout explicit approval. - Every
.user.jscode or metadata change must increment its SemVer@versionand add a matching top CHANGELOG entry. - Run
npm run checkbefore completion.
Definition of done
Code, metadata, README, CHANGELOG, privacy disclosures, and tests must agree. A generated scaffold is not a finished plugin. Leaving TODO(userscript), overstating verification, or delivering only a code fragment is incomplete.
When a published script's version is advanced and merged to main, CI may prepare a production release that still requires approval through the userscript-production environment. Do not bypass a failed automatic plan with a direct release; follow docs/release.md.
