female-portrait-director: Turn Portrait Prompts into a Reusable Skill
"The female-portrait-director GitHub README confirms the project's purpose, version V1.4.1, author, MIT license, 14 styles, install commands, output format, and safety boundaries."
"The project SKILL.md confirms the on-demand loading order, registry routing, parameter-locking rules, the five-paragraph fused prompt, and the separate copy-ready code blocks."
"The project parameter_schema.md confirms the 22 parameter fields, their defaults, and the 5 output modes."
"The OpenAI Codex Agent Skills docs confirm the required SKILL.md fields, progressive disclosure (about 2% of context or 8,000 characters), explicit/implicit invocation, and distribution."
Anyone who tunes portrait images has done the same thing: last time you finally pieced together a prompt that worked, and this time you rewrite it from scratch for a new scene. Switch to a cafe and you add lighting cues; switch to a gufeng look and you swap the outfit words; mix the keywords for “clean” and “Hong Kong retro” by accident, and the face starts to bleed between styles. Worse are the parts you can’t control: you wrote 9:16 but got a square, you only wanted a fashion portrait but the model added its own filter.
female-portrait-director sets out to solve exactly this “prompts aren’t reusable” problem. It’s an open-source AI portrait prompt director Skill: you give it a few structured parameters, and it locks the direction you explicitly set, loads just one style route on demand, expands the parameters into a coherent, photographed-feeling prompt, and adds negative constraints. Its value isn’t yet another set of universal prompts. It’s that it turns a prompt from one-off text you rewrite every time into a reusable, maintainable interface with boundaries. What’s worth dissecting are the four engineering pillars behind it, which are also the parts any prompt can borrow.
First, how it differs from a hand-written prompt
The problem with a long hand-written portrait prompt isn’t that it’s poorly written. It’s that it’s one-off. Change the scene and you edit half the words by hand; change the style and you have to remember which keywords can’t coexist; come back two weeks later and you can’t tell why you wrote it that way.
Put the three approaches side by side and the difference is clear:
| Dimension | Hand-written prompt | Prompt template | Prompt Skill |
|---|---|---|---|
| Reusability | Low, rewrite each time | Medium, copy then edit | High, just fill fields |
| Consistency | Depends on your touch | Depends how carefully you edit | Guaranteed by rules |
| Maintainability | Hard, scattered everywhere | So-so, templates go stale | Good, edit in one place |
| Style isolation | Bleeds easily | Up to self-discipline | Loads one route on demand |
| Safety boundaries | Remembered each time | In a comment | Hard-coded into rules |
| Onboarding cost | Low | Low | Medium, you build structure first |
Templates are already a big step up from raw prompts, and there’s a library of 12 reusable prompt design patterns on that. But a template’s ceiling is “copy then edit”; it can’t enforce style isolation and doesn’t catch safety boundaries. A Skill goes one step further: it folds the input into fields, settles the rules into files, and lets the AI run by those rules.
A 30-second look at female-portrait-director
The project is built by Li Yue, MIT-licensed, and as of June 2026 the version is V1.4.1. It’s distributed as a Codex Skill and follows the general agent skill standard (a SKILL.md with a name and description). Once installed, type $female-portrait-director in the chat to call it.
You can sum up how it works with a minimal flow: you fill a few fields from a template, and it returns four structured sections.
Input (minimal template):
Style: clean lifestyle portrait
Scene: window seat in a cafe
Outfit: white knitted cardigan + light-colored inner layer
Mood: clean and gentle
Aspect ratio: 9:16
Output (four sections):
1. Locked parameters: echoes your input field by field
2. Module analysis: how face / body / outfit / scene / camera / lighting / filter are handled
3. Final prompt: a single copy-ready block
4. Negative constraints: what to avoid
Notice there’s no summary-style list in the output. It expands the few fields you gave into a concrete scene, and that’s the fundamental difference from a template. As the project puts it: examples show what “finished” looks like, they aren’t fixed templates, and every run should re-pick the event, action, and environment details.
Install and first call
One-line npx install
The fastest way is to install globally into Codex skills with npx:
npx skills@latest add liyue-aigc/female-portrait-director -g -a codex -y
To update later:
npx skills@latest update female-portrait-director -g -y
Manual git clone
You can also clone it into Codex’s skills directory. Windows PowerShell:
git clone https://github.com/liyue-aigc/female-portrait-director.git "$env:USERPROFILE\.codex\skills\female-portrait-director"
macOS or Linux:
git clone https://github.com/liyue-aigc/female-portrait-director.git "${CODEX_HOME:-$HOME/.codex}/skills/female-portrait-director"
After installing, restart Codex or open a new conversation and type $female-portrait-director to trigger it. One mechanism is worth knowing: Codex uses progressive disclosure. By default it only puts each skill’s name, description, and path into context, with the initial list capped at about 2% of the context window, or 8,000 characters when the window is unknown; it reads the full SKILL.md only when it decides to use a skill. That means you can install a pile of skills without permanently crowding your context, which matters a lot for understanding the design that follows. Check the repository README for the exact version and commands.
Pillar one: parameter locking, so what you say isn’t rewritten
The most common way portrait prompts fall apart is the model quietly changing what you explicitly asked for. You wrote 9:16 and got a square; you only wanted a fashion portrait and it added a filter on its own.
The first layer of female-portrait-director’s design is parameter locking. It defines 22 parameter fields, from style, scene, outfit, and palette to camera, lighting, aspect ratio, and platform purpose, each with a default. The rule is firm: lock the fields the user explicitly set, only fill in the missing ones, and never replace the direction. As the project’s FAQ explains, what’s locked is the direction you chose, not the pixel-level detail, so it doesn’t limit creativity; the system still adds the natural moment, action chain, and gaze.
A hard control like aspect ratio gets one more guard. The project requires the aspect ratio and pixel size to go in the first sentence of the final prompt, using your exact value. The reason is the old problem above: placed in the middle or the end, the model tends to ignore it; placed in the first sentence as a hard constraint, the output ratio stays stable.
Ported to your own case, this layer amounts to defining an input schema with defaults for your prompt. Decide which fields the user must own and which can fall back automatically, and only then does the prompt become reusable.
Pillar two: on-demand routing, load one style at a time
It supports 14 styles, from clean lifestyle, urban fashion, and e-commerce model shots to gufeng fantasy, Hong Kong retro, and new Chinese style. A natural question: why not stuff all 14 into one giant prompt and let the model pick?
Because stuffing them together causes bleed. With gufeng keywords and Hong Kong-retro keywords present at the same time, the model easily mixes traits from both into one face. The project’s approach is to use a lightweight style registry (style-registry) as the single routing entry, where each request only matches and reads one style route file, and the other 13 never enter context. The FAQ says it plainly: on-demand loading reduces irrelevant rules entering context, cuts style bleed and templated output, and improves processing efficiency.
This idea is the same engineering principle as Codex’s progressive disclosure mentioned earlier, just at a different level. Codex loads only a skill’s description at the framework level and reads the full text on a match; female-portrait-director does it again inside the skill, looking at the registry first and reading only that one style on a match. Both answer the same question: context is a scarce resource, so don’t pour everything in at once.
The takeaway is clear too: when your prompt has to cover many styles, scenes, or task types, don’t pile up a monster prompt; use a “registry plus on-demand loading” structure so each call loads only the relevant slice.
Pillar three: modular director expansion, turning parameters into a scene
If the standard output just rearranges the fields you filled in, it’s no different from a template. female-portrait-director stresses that standard output must not be a summary, because a summary isn’t enough to stably control generation.
It breaks the scene into 7 visual modules: face, body, outfit, scene, camera and pose, lighting, and filter. The final prompt in standard detailed output must be exactly five paragraphs, covering, in order, the person and temperament; the time slice and action; body and outfit; scene and camera; lighting and filter. Director-style expansion means using a time slice plus a small event, an action chain, a gaze target, and two or three selective environment details to fuse these fields into one coherent moment, instead of piling the fields into a list.
Here’s the difference in concrete terms. A summary writes “white cardigan, cafe, soft light.” A director writes a captured moment: a window seat, she has just set down her cup, her gaze on the street outside, the afternoon light coming in from the left. The latter stably controls generation; the former only gambles.
This layer reminds us that reusable is not template fill-in. Structure is for stability, but you have to leave room for expansion and reasoning, or every reused image comes out the same.
Pillar four: safety boundaries and output format, more reusable means more controlled
Turning a set of portrait prompts into a Skill anyone can call amplifies compliance risk, so the boundaries have to be written into the rules rather than remembered each time.
female-portrait-director’s safety boundaries are explicit: by default it generates fictional, clearly adult women; identity preservation is allowed only with your own or authorized adults’ reference images; sexualizing minors, explicit nudity, non-consensual images, and deceptive identity are forbidden. Even for curve-focused styles, it requires avoiding exposed private areas and age-ambiguous framing. These are the project’s responsible-use constraints; in actual generation you still have to follow your platform’s rules and local law.
Output format is a form of control too. It requires the final prompt and the negative constraints to each sit in a separate code block tagged text, with titles kept outside the block for easy copying and no analysis mixed into the copy-ready content. The detail looks small but matters for reuse: the caller always gets the same predictable structure.
Do it yourself: 5 steps to fold your prompt into a Skill
This approach isn’t limited to portraits. Any prompt you rewrite over and over can be folded into a Skill in the five steps below.
- Extract a parameter schema. List the things you change every time as fields, and give each field a default. Decide which the user must set and which can fall back.
- Build a registry with on-demand loading. If there are many styles or task types, build a lightweight entry table and load only the matching rule file each time instead of piling them all together.
- Write director-style expansion rules. Specify how to expand fields into a coherent result, not re-list them.
- Set safety boundaries and an output contract. Hard-code the prohibitions and the output structure so every call returns a predictable format.
- Package it as a SKILL.md. Write a clear
nameanddescription, with the description spelling out the trigger scenario and boundaries so the agent can match it implicitly.
A minimal SKILL.md skeleton
Swap the content for your domain; this is a self-written example, not the project’s original:
---
name: my-prompt-skill
description: Triggers when the user needs an X-type prompt; takes a few fields and returns a structured result with negative constraints.
---
# Flow
1. Read the fields, lock the ones the user set explicitly, fill missing ones with defaults.
2. Pick one matching style/task route from the registry and load only that one.
3. Expand into a coherent result by the director-style rules, don't list fields.
4. Output the final result and negative constraints in separate code blocks.
A few common pitfalls when you build it, with fixes:
| Symptom | Cause | Fix |
|---|---|---|
| User-set fields get changed | No parameter locking | Echo the locked result explicitly, put hard controls in the first sentence |
| Style bleed | Many rules in context at once | Route through a registry, load one at a time |
| Output becomes a field list | Missing director-style expansion rules | Require expansion into a coherent scene or result |
| Installed but won’t trigger | description is too vague | Put the trigger scenario and keywords into the description |
Who it suits, and who it doesn’t
Not every need is worth turning into a Skill. A quick call:
| Your situation | Suggestion |
|---|---|
| You shoot similar portraits often and want stable reuse | Install the ready-made Skill |
| You have your own domain prompts you rewrite repeatedly | Build your own following this approach |
| You just need one or two images for now | Skip the Skill, writing by hand is faster |
| Real people or reference images are involved | Confirm authorization and compliance first, then consider automation |
What’s truly worth borrowing from female-portrait-director isn’t its 14 styles, but how it treats a prompt as an engineering object: the input has a schema, the rules load on demand, the expansion has a method, and the boundaries live in files. To understand the Skill mechanism itself, start with the Skill feature in Claude Code; for another case of turning repetitive creation into a pipeline, see guizang-social-card-skill; to brush up on writing portrait prompts themselves, check the Stable Diffusion prompt template guide.
Conclusion
female-portrait-director did something with portrait prompts that most people don’t: it turned them from text you rewrite every time into an interface with an input schema, on-demand routing, director-style expansion, and clear boundaries. You don’t have to use its portrait features, but its four engineering pillars port directly to any prompt you keep tuning. The next step is simple: pick a prompt you rewrite two or three times a week, fold it into a SKILL.md with those 5 steps, and run it twice to see whether it’s steadier than writing by hand.
Turn your prompt into a reusable Skill
Following the design of female-portrait-director, engineer a prompt you keep rewriting into a Skill.
⏱️ Estimated time: 1 day
- 1
Step1: Extract a parameter schema
List the things you change every time as fields, give each field a default, and decide which fields the user must set and which can fall back to defaults. - 2
Step2: Build a registry with on-demand loading
When there are many styles or task types, build a lightweight entry table and load only the one matching rule file each time, instead of putting every rule in context at once. - 3
Step3: Write director-style expansion rules
Specify how to expand fields into a coherent result rather than re-listing the fields, leaving room for expansion and reasoning. - 4
Step4: Set safety boundaries and an output contract
Hard-code the prohibitions and the output structure so every call returns a predictable, copy-ready format. - 5
Step5: Package it as a SKILL.md
Write a clear name and description that explain the trigger scenario and boundaries, so the agent can match it explicitly or implicitly.
FAQ
What is female-portrait-director?
How do I install female-portrait-director in Codex?
How is writing portrait prompts with a Skill different from writing one long block by hand?
Does parameter locking limit creative freedom?
How do I build my own reusable prompt Skill following this approach?
What safety and compliance points matter when generating portraits with it?
12 min read · Published on: Jun 10, 2026 · Modified on: Jun 15, 2026
AI Agent Toolbox
If you landed here from search, the fastest way to build context is to jump to the previous or next post in this same series.
Previous
guizang-social-card-skill: A Reusable Pipeline for Rednote Cards and WeChat Covers
Learn what guizang-social-card-skill does, how to install it in Claude Code or Codex, and how to check layouts, themes, rendering, licensing, and QA before publishing.
Part 2 of 4
Next
ADHD: Fixing Premature Convergence in Coding Agents with Parallel Divergent Reasoning
ADHD is an open-source skill built on the Claude and Codex Agent SDK that fights premature convergence in coding agents using isolated parallel divergence plus a separate critic pass. Here is how it differs structurally from Chain-of-Thought and Tree-of-Thought, when to reach for it, how to install and trigger it, and what a single run costs.
Part 4 of 4
Related Posts
Continuum and Choosing an Agent Runtime: 7 Capabilities to Check From Notebook to Production
Continuum and Choosing an Agent Runtime: 7 Capabilities to Check From Notebook to Production
Mnemo Local Memory Layer: Portable Recall for Ollama and Custom LLM Apps
Mnemo Local Memory Layer: Portable Recall for Ollama and Custom LLM Apps
vibecode-pro-max-kit: Specs, Memory, and Multi-Agent Workflow for AI Coding
Comments
Sign in with GitHub to leave a comment