wp-set-attributes

wp-set-attributes is a command for coding agents from Ganbin/4d-development-skill. It costs 0 tokens per session (1,303 once invoked), scanned A, original, MIT.

A 4D Write Pro command for changing character, paragraph, document, table, or image settings on a selected range or document.

In plain words
What is it for?
Use it to set attributes on text ranges, paragraphs, sections, tables, rows, headers, footers, pictures, styles, or complete 4D Write Pro documents.
Why use it?
It lets developers update document formatting and other built-in settings without handling each type of document element separately.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ganbin/4d-development-skill/wp-set-attributes
Clone the repo
git clone --depth 1 https://github.com/Ganbin/4d-development-skill

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-set-attributes

README.md
[![agentmods](https://agentmods.dev/badge/commands/ganbin/4d-development-skill/wp-set-attributes.svg)](https://agentmods.dev/commands/ganbin/4d-development-skill/wp-set-attributes)
Your own site
<a href="https://agentmods.dev/commands/ganbin/4d-development-skill/wp-set-attributes"><img src="https://agentmods.dev/badge/commands/ganbin/4d-development-skill/wp-set-attributes.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01303
Opus 5 $0.00000 $0.00651
Sonnet 5 $0.00000 $0.00261
Haiku 4.5 $0.00000 $0.00130

Measured yesterday against content hash 6a9ed9b75a08, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

wp-set-attributes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/WritePro/commands/wp-set-attributes.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Parameter Type Description
targetObj Object Range or element or 4D Write Pro document
attribName Text Name of attribute to set
attribValue any New attribute value
attribObj Object Object containing attribute names and their corresponding values to set

Description

The WP SET ATTRIBUTES command allows you to set the value of any attribute in a range, element, document. This command gives you access to any kind of 4D Write Pro internal attribute: character, paragraph, document, table, or image.

In targetObj, you can pass :

  • a range, or
  • an element (header / footer / body / table / row / paragraph / anchored or inline picture / section / subsection / style sheet), or
  • a 4D Write Pro document

You can specify attributes to set for targetObj in one of two ways:

  • Use the attribName and attribValue parameters. In attribName, pass the name of the attribute to set for the target and in attribValue, pass the new value to set. You can pass as many attribName/attribValue pairs as you want in a single call.

  • Use the attribObj parameter to pass a single object containing attribute names and their corresponding values as object properties.

For a comprehensive list of attributes to pass, as well as their scope and respective values, please refer to the 4D Write Pro Attributes section.

Example 1

In this 4D Write Pro area, you selected a word:

If you execute the following code:

 $range:=WP Get selection(*;"WParea") //get the selected range
 
  // set the shadow offset in pt for the selected text
 WP SET ATTRIBUTES($range;wk text shadow offset;1)
  //set the paragraph padding
 WP SET ATTRIBUTES($range;wk padding;1)
  //define a border of 10 pt
 WP SET ATTRIBUTES($range;wk border style;wk solid;wk border width;10)
  //set the border colors
 WP SET ATTRIBUTES($range;wk border color;"blue";wk border color bottom;"#00FA9A";wk border color right;"#00FA9A")

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 154 lines · 0 tokens per session scan A 6a9ed9b75a08

Subscribe to this mod's changes

wp-set-attributes is a command published in the GitHub repository Ganbin/4d-development-skill (9 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,303 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.