- Home
- Skills
- Prompt & Skill Engineering
- PlainLogic — Write Logic in Plain English, Get Real Code
Works with the AI Agents you already use
PlainLogic — Write Logic in Plain English, Get Real Code
Translate PlainLogic pseudocode and .plog documents into idiomatic, verified source code and unit tests.
Free
PlainLogic — Write Logic in Plain English, Get Real Code
Example session with this skill installed
Use PlainLogic to implement the logic in calculate-shipping.plog into a TypeScript function. Check the mappings in the repo first.
- Read your context and instructions
- Compiled the plainlogic
I have processed calculate-shipping.plog and cross-referenced the symbolic types with your plainlogic-maps.md. The logic passed the structural check with the --ready flag.
Implementation: calculateShipping.ts
import { Order, ShippingResult } from "./types";
import { getCarrierRate } from "./api/carriers";
/**
* Implements calculate-shipping.plog
* > Calculate base rate from weight
* > Apply regional multipliers
* > Return total with carrier surcharge
*/
export async function calculateShipping(order: Order): Promise<ShippingResult> {
// Mapping: weight_lbs -> order.totalWeight
const baseRate = order.totalWeight * 0.5;
// Logic: if weight > 50 apply heavy_multiplier (1.2)
let multiplier = 1.0;
if (order.totalWeight > 50) {
multiplier = 1.2;
}
// Mapping: carrier_api -> getCarrierRate
const carrierSurcharge = await getCarrierRate(order.destinationZip);
const total = (baseRate * multiplier) + carrierSurcharge;
return {
total,
isHeavy: order.totalWeight > 50,
timestamp: new Date().toISOString()
};
}
Next steps
- Run
python scripts/case_to_tests.py calculate-shipping.plog --target typescriptto generate the test suite. - Review the
heavy_multipliervalue in the logic, as it was resolved via alias rather than a hardcoded constant. - Update
plainlogic-maps.mdif theShippingResultinterface requires additional fields.
Connects securely to your tools. The creator never sees your data.
About this skill
Writing code from vague requirements usually leads to guesswork and technical debt. This skill implements PlainLogic, a structured pseudocode format that bridges the gap between human intent and idiomatic implementation. It allows you to define behavior using English steps, exact logic, and aliases, then translates them into verified source code while preserving your architectural decisions.
What it does
- Interprets .plog documents to generate source code in Python, TypeScript, or C#.
- Validates logic feasibility by identifying contradictions between English intent and exact conditions.
- Converts source-embedded logic by finding PlainLogic blocks within existing files and updating implementation.
- Drafts reviewable pseudocode to define complex routines before committing to a specific language.
- Generates unit tests from PlainLogic case declarations to verify the final implementation.
- Scans and pins regions to track changes in logic blocks and ensure implementation remains in sync.
How it works
- Analyze input by reading a
.plogfile, an inline code fence, or a requirements document. - Select the mode based on the request: implement code, draft logic, validate feasibility, or explain existing blocks.
- Verify mappings against
plainlogic-maps.mdto resolve symbolic types and ports to real API interfaces. - Run structural checks using the bundled Python validator to ensure the logic is ready for implementation.
- Execute the transformation to produce the final source code, annotated with mapping decisions.
Frameworks & tools
This skill includes a Python-based structural checker and a test generator (case_to_tests.py). It utilizes a plainlogic-maps.md schema for mapping symbolic logic to concrete repository interfaces.
Why this beats prompting it yourself
Generic prompts often ignore edge cases or hallucinate API calls. This skill uses a formal interpretation layer and mapping file to ensure every logic step maps to your specific codebase and architecture without guesswork.
Use cases
- Implement complex business rules defined by non-technical stakeholders.
- Maintain logic documentation directly inside source files via fenced blocks.
- Scaffold unit tests automatically from behavioral specifications.
- Audit existing logic for feasibility and contradictions before starting a sprint.
Known limitations
The structural checker requires a Python environment. It does not execute the document or interpret prose semantics; it only validates structure and availability of aliases.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Prompt & Skill Engineering.
Requires Python for structural checking and test generation. The checker validates structure but does not verify the logical correctness of prose steps.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 21 days ago
- Free with an Agensi account
- Software
Python