Catalogue / ziniao-erp-roles
ziniao-erp-roles
Older skill: source not recordedSignedManage Ziniao ERP roles (permission groups) with ziniao-cli: list roles and ids, inspect a role's permissions, discover available permission items, create or update roles, and assign roles to one or many staff. Use when the user mentions roles, permission groups, assigning a role to employees, check…--- name: ziniao-erp-roles description: "Manage Ziniao ERP roles (permission groups) with ziniao-cli: list roles and ids, inspect a role's permissions, discover available permission items, create or update roles, and assign roles to one or many staff. Use when the user mentions roles, permission groups, assigning a role to employees, checking a staff member's roles or existing permissions, or needs a role-id to create an employee — even if they do not name the CLI." ---
Ziniao ERP role management
This skill requires the ziniao-cli binary; it is unusable without it.
Core workflow
- Read shared setup. Before running any command, read
../ziniao-shared/SKILL.md— shared setup lives there, not here.
- Get role ids. Run
ziniao-cli role list. Employee creation requires a--role-id, and this list is where it comes from.
- Discover permissions. Before creating a role, run
ziniao-cli role permissions --identity-id <identity-id>to list the permission items available for that identity type, and build the role from those ids so nothing invalid is submitted.
- Create a role. Pass permission ids as one comma-separated string:
--permission-ids "100,101". The new role's id is the response'sdata.idfield — capture it, since assignment and employee creation need it.
- Update a role.
role updateis a full replace: omitted fields may be cleared. Runziniao-cli role detailfirst, then submit the complete role — every current field plus your edits, permission ids again as a comma-separated string.
- Assign roles to staff.
--staff-idaccepts a single id or a comma-separated list for batch assignment:--staff-id "456,789,101". Query a staff member's existing roles before assigning to see what they already hold.
If an exact subcommand name is unclear, read the CLI's help output rather than guessing.
Output shaping
Append --format table for a readable listing, or --jq '<filter>' to extract only the fields a script needs — useful when chaining a role id into the next command.
Raw REST fallback
When a CLI operation is unavailable or misbehaves, call the REST API directly:
| Operation | Path | |---|---| | Role list / detail / add / edit | /superbrowser/rest/v1/erp/per/role/ | | Staff-role operations | /superbrowser/rest/v1/erp/staff/ |
Request bodies are JSON, with types differing from the CLI's flag style:
permissionIdsis a JSON array:{"permissionIds": [100, 101]}staffIdsis an array of strings:{"staffIds": ["456", "789"]}
These are the same ids the CLI takes as comma-separated strings, converted to arrays. A raw add also returns the new role's id in data.id.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 2.7 kB | 835f0e8d3721 |
| examples.json | 1.7 kB | cef92d98b8c4 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | Not recorded | 16 Nov 2026 |
Locking a skill to one version needs Pro.