Inspiration
I asked ChatGPT to come up with some ideas for this hackathon. Then it suggested to build promptlint
What it does
It uses a combination of system prompts and the Kilo Gateway as an LLM provider to improve and criticize your vage prompts.
How I built it
I used GPT 5.3 Codex on medium reasoning effort to build the app. If anyone is interested, here is the prompt:
Build a production-ready CLI tool called promptlint.
Goal:
Create a developer CLI that analyzes AI coding prompts and returns structured feedback on quality, ambiguity, safety, and completeness.
Core concept:
Developers pass a prompt file to the CLI. The tool evaluates it using an LLM and outputs:
Ambiguities
Missing constraints
Security red flags
Non-determinism risks
Suggested improved version
Overall quality score (0–100)
Technical requirements:
Language: Node.js (TypeScript preferred).
CLI framework: Commander or similar.
Package manager: bun.
The tool must work as:
promptlint prompt.txt
Features:
Reads prompt from file or stdin.
Sends prompt to an LLM API (abstract provider layer so Kilo/OpenAI/etc. can be swapped).
Returns structured JSON internally.
Displays clean formatted CLI output.
Optional flag: --json for raw JSON output.
Optional flag: --strict to increase lint severity.
Exit code:
0 = good prompt
1 = warnings
2 = critical issues
LLM evaluation instructions (this is the analysis prompt the tool should send):
You are a strict AI prompt auditor for software engineering prompts.
Analyze the following prompt and return structured JSON with:
{
"ambiguities": [],
"missing_constraints": [],
"security_risks": [],
"nondeterminism_risks": [],
"clarity_score": 0-100,
"improved_prompt": "rewritten version"
}
Evaluation criteria:
Ambiguity: unclear scope, vague requirements, undefined inputs/outputs.
Missing constraints: no performance limits, no error handling expectations, no edge cases, no formatting constraints.
Security risks: injection vectors, unsafe code generation patterns, secrets exposure, production misuse.
Non-determinism: open-ended instructions without boundaries.
Clarity score: strict scoring. 90+ only for production-grade prompts.
Output only valid JSON.
Additional requirements:
Implement a provider abstraction layer:
interface LLMProvider { analyze(prompt: string): Promise<AnalysisResult> }
Provide one implementation (e.g., OpenAI-compatible REST).
Environment variable for API key.
Graceful error handling.
Clean README with install instructions.
MIT license.
Modular file structure.
Unit test for parser and formatter.
Bonus (if time allows):
Add --fix flag to automatically print only improved prompt.
Add colorized output.
Add Git pre-commit hook support.
The final result must be:
Installable via npm
Open source ready
Clean code
Easy to extend
Production structured
Deliver full project structure and code files.
ONLY add the kilo provider for now.
Here is an example on how to implement it:
import { streamText } from 'ai'
import { createOpenAI } from '@ai-sdk/openai'
const kilo = createOpenAI({
baseURL: 'https://api.kilo.ai/api/gateway',
apiKey: process.env.KILO_API_KEY
})
const result = streamText({
model: kilo('anthropic/claude-opus-4.6'),
prompt: 'Why is the sky blue?'
})
Challenges I ran into
Nothing to be honest.
Accomplishments that I'm proud of
I managed to create a CLI tool in 30 minutes that works in one go.
What I learned
Don't try to build a GTK app for 2 days straight that doesn't work and eventually realize you have to pivot to creating something last-minute because of deadline stress.
What's next for promptlint
Maybe I'll make it easier to use by creating a TUI for it with an easy-to-follow setup flow.
Built With
- bun
- codex
- kilo-gateway
- node.js
- typescript
Log in or sign up for Devpost to join the conversation.