How Starter Prompts Are Defined in the No AI Slop Plugin Manifest
Starter prompts for the no-ai-slop plugin are declared in the .codex-plugin/plugin.json manifest file under the interface.defaultPrompt array, with build-time validation enforcing a maximum of three prompts and 128 characters per entry.
The no-ai-slop plugin by Peter Yang provides a structured interface for detecting and removing AI-generated content patterns. Starter prompts serve as pre-configured examples that guide users when they first interact with the plugin. These prompts are defined in the plugin metadata and subjected to strict validation rules during the build process.
Manifest Location and Field Structure
Starter prompts are defined in the .codex-plugin/plugin.json file within the interface.defaultPrompt field. This array contains the default text examples that appear in the plugin interface upon initialization.
{
"interface": {
"displayName": "No AI Slop",
"shortDescription": "Remove 20+ AI slop patterns",
"longDescription": "...",
"developerName": "Peter Yang",
"category": "Productivity",
"capabilities": [
"Edit",
"Detect",
"Preserve voice"
],
"defaultPrompt": [
"(text)",
"is this slop? (text)"
]
}
}
- The
defaultPromptarray holds the starter prompts that appear when the plugin is first used. - Each entry is a string representing a template or example query.
- The field resides within the
interfaceobject alongside metadata likedisplayNameandcapabilities.
Build-Time Validation Constraints
The scripts/build_plugin.py script validates starter prompts during the build process. According to lines 45-48 of the build script, two strict constraints are enforced:
- Maximum count: No more than three starter prompts
- Maximum length: Each prompt must be 128 characters or fewer
prompts = interface["defaultPrompt"]
if len(prompts) > 3 or any(len(prompt) > 128 for prompt in prompts):
raise SystemExit("Starter prompts must contain at most three entries of 128 characters or fewer")
If these constraints are violated, the build process aborts with a SystemExit error, ensuring that only compliant starter prompts ship with the plugin.
Runtime Access Pattern
While the manifest defines the prompts, runtime access follows standard JSON parsing patterns:
import json
with open(".codex-plugin/plugin.json") as f:
manifest = json.load(f)
starter_prompts = manifest["interface"]["defaultPrompt"]
# Use `starter_prompts` to pre-fill the UI or provide default examples
This pattern allows the plugin interface to dynamically load the validated starter prompts and present them to users as default input examples.
Summary
- Starter prompts are defined in the
.codex-plugin/plugin.jsonmanifest underinterface.defaultPrompt. - The
defaultPromptfield accepts an array of string values. - Build validation in
scripts/build_plugin.pyenforces a maximum of three prompts. - Each starter prompt must not exceed 128 characters in length.
- Violations during build time trigger a
SystemExiterror to prevent non-compliant deployments.
Frequently Asked Questions
What is the maximum number of starter prompts allowed?
The no-ai-slop plugin permits up to three starter prompts in the manifest. The build script scripts/build_plugin.py explicitly checks the array length and aborts the build if more than three entries are provided.
What is the character limit for each starter prompt?
Each starter prompt must be 128 characters or fewer. The validation logic in scripts/build_plugin.py iterates through the defaultPrompt array and raises a SystemExit if any entry exceeds this limit.
Where is the plugin manifest located?
The plugin manifest is located at .codex-plugin/plugin.json in the repository root. This file contains the interface.defaultPrompt field where starter prompts are declared alongside other metadata like displayName and capabilities.
What happens if starter prompt constraints are violated?
If the starter prompts violate the count or length constraints, the build process aborts immediately with a SystemExit error. This prevents the plugin from being packaged with non-compliant prompt configurations.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →