BUILDING
The from-zero guide to a new Raven agent: one command scaffolds a folder, the folder is…
A logo, a product screen, a published chart, a paper's own figure and a photograph of a real place exist already. Search for those. Generate only what does not exist: illustration, backdrop, atmosphere.
$ npx -y skills add EverMind-AI/Raven --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
A logo, a product screen, a published chart, a paper's own figure and a photograph of a real place exist already. Search for those. Generate only what does not exist: illustration, backdrop, atmosphere.
A logo, a product screen, a published chart, a paper's own figure and a photograph of a real place exist already. Search for those. Generate only what does not exist: illustration, backdrop, atmosphere.
**Never generate a substitute for something real** -- a product UI, a logo, a person, a scientific result, a published figure, a statistical claim. A drawn approximation of a real mark is not a placeholder, it is a page stating something false about a thing that exists. If the search finds nothing, the page says so and names who can supply it.
Search the whole deck at once, before the first page is drawn: go through the plan page by page, name the picture each one wants, and run them together. The pool is what the pages choose from; one query per page, asked while that page is being drawn, gets whatever comes back. Search what the material names -- a product, a company, a standard, a benchmark, a paper -- and the furniture no material ever links: the logos and the marks.
`web_search` returns pages. For pictures call `image_search`, with every picture the deck needs as `queries=[...]` in one call; the results come back grouped by query. Each hit carries the direct image URL, its pixel size, the domain and the page it came from, and anything under 640px wide or 360px tall is already dropped. Keep the page link beside what you took: it is what the page's source note credits. When `image_search` is not in your tool list the pictures may still be findable: `web_search` for the page that carries one -- the project site, the paper, the vendor, the museum -- and `web_fetch` it. Where the text it returns keeps the image links, download one in the build script. Some fetch backends strip them; then the page goes without.
Look at what you fetched before placing it. A hit that is the right size can still be a thumbnail sheet, a watermarked stock frame, or somebody else's slide about the subject.
A fetched mark that already has an alpha channel lands on the page's own ground with nothing behind it. The worst thing to do with a cut-out is to box it in a white rectangle.
Both run on `raven-python`.
import pymupdf
doc = pymupdf.open("paper.pdf")
# Find the figure by its caption (with the colon), whichever page carries it.
page, caption = next((p, hit) for p in doc for hit in p.search_for("Figure 2:"))
# A raster figure is embedded as an image and comes out at its own resolution.
for i, info in enumerate(page.get_images(full=True)):
pix = pymupdf.Pixmap(doc, info[0])
if pix.n - pix.alpha >= 4:
pix = pymupdf.Pixmap(pymupdf.csRGB, pix)
pix.save(f"assets/p{page.number + 1}_img{i}.png")
# A vector figure or a table has no embedded image: crop the region above the caption,
# look at the crop, move the rectangle until the whole figure and nothing else is inside.
region = pymupdf.Rect(page.rect.x0 + 40, caption.y0 - 300, page.rect.x1 - 40, caption.y0 - 4)
page.get_pixmap(clip=region, dpi=220).save("assets/fig2.png")from raven_ppt.services.assets.formulas import add_formula
shape = add_formula(
slide,
r"L(\theta)=L_{\mathrm{new}}(\theta)+\frac{\lambda}{2}\sum_i F_i\,(\theta_i-\theta^{*}_{i})^{2}",
left_in=0.8, top_in=2.6, size_pt=18, colour="1F2A44", serif=False,
)`size_pt` = the body size beside it. `serif=True` for a deck set in a serif face. `colour` = the deck's ink. `max_width_in` scales a long expression down to a column. `\mathrm{}` sets a word upright. No `\text{}`, no `align`, no matrix; prose stays outside the expression. The returned shape carries the `width` and `height` to make room for.
Symbols inside a sentence are text, set as runs with real scripts rather than a picture:
from raven_ppt.services.assets.formulas import math_runs paragraph = box.text_frame.paragraphs[0] math_runs(paragraph, "旧后验 p(θ | D_A) 由 F_i 和 θ* 决定", size_pt=16, colour="1F2A44")
`_A` and `_{new}` subscript; `^2` and `^{T}` superscript; `θ*` is θ with a raised star. A plain Greek letter or a word needs neither call.
image_generate(
prompt="<subject, mood, what to leave out>",
images=["/abs/path/logo.png"], # up to 6 on a chat-routed model, 16 on gpt-image
aspect_ratio="16:9",
)than describing it.
almost pure dark, reserved for title text`.
An illustration that floats on the page's own ground needs transparency, and asking for "a transparent background" in words returns a drawn checkerboard. Generate the subject on a green screen and key it out:
CUT_OUT = (
"Transparent-background production constraint: generate the subject on a solid pure "
"green background, hex #00ff00. Keep the background flat, evenly lit and shadow-free; "
"do not use green in the subject, its reflections, glow or edge details; nothing "
"touches the edges of the image. The green will be removed by chroma keying into a "
"real alpha channel."
)import io
from PIL import Image, ImageFilter
DESPILL_REACH = 5
def is_screen_green(r, g, b):
if g >= 145 and r <= 130 and b <= 130 and g - max(r, b) >= 35:
return True
top, low = max(r, g, b), min(r, g, b)
if top == 0 or g <= r or g <= b:
return False
spread = top - low
if spread == 0:
return False
hue = 60 * ((b - r) / spread + 2)
return 80 <= hue <= 160 and spread / top >= 0.35 and top / 255 >= 0.45
def key_out_green(png: bytes) -> tuple[bytes, float]:
image = IOne Surface, All Agents: Raven generates DAGs and orchestrates multiple specialized agents for complex tasks. Raven is the harness of harnesses, built for recursive self-improvement (RSI).
The from-zero guide to a new Raven agent: one command scaffolds a folder, the folder is…
You are helping with software engineering tasks: fixing bugs, changing behavior, adding…
You are helping with software engineering tasks: fixing bugs, changing behavior, adding…
When a task asks you to change code (fix a bug, change behavior), work in phases:
Tool signatures are provided automatically via function calling. Only use tools and…
I am Raven-Code, a coding agent. My work is the repository bound to this session: I read it…