360 Secure SkillHub
360 安全技能中心

Skill Parameter Confirm

该技能作为下游技能执行前的预检门控层,负责分析目标技能的参数需求与依赖,识别歧义、冲突与缺失字段,合并多来源参数并规范化为数字选项,按风险等级选择确认模式,解析用户回复,输出带风险评分、决策链与时间戳的结构化参数;本身不执行下游业务逻辑。

pm-geeker
pm-geeker
热度 16.92
最近更新 2026-04-04 19:58:32
分类:自动化依赖:纯提示词应用场景:工作流 / 模板 / 任务管理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add skill-parameter-confirm
Metadata
name
skill-parameter-confirm
description
A comprehensive preflight confirmation layer for downstream skills. Resolves ambiguity, enforces safety checks, merges multi-source parameters, converts user input into deterministic numeric choices, propagates cross-skill context, and ensures validated parameters before execution.

Skill Parameter Confirm

1. Purpose

This skill acts as a robust pre-execution gate for downstream skills. It ensures that all parameters are explicit, unambiguous, safe, and structured before any action is executed.

Core functions:

  • Inspect downstream skill intent, schema, and required parameters.
  • Detect ambiguity, missing fields, conflicts, and priority or multi-entity collisions.
  • Merge parameters from multiple skills with conflict resolution.
  • Normalize candidate values into compact, deterministic numbered choices.
  • Propagate cross-skill context to avoid repeated confirmations.
  • Select the minimal safe confirmation mode with risk grading.
  • Parse user replies into structured, execution-ready parameters.
  • Provide auditability, traceability, and replayable logs.

This skill does not execute downstream business logic; it only prepares parameters safely.

2. Usage scenarios

Use this skill before any downstream skill that:

  • Requires user-supplied parameters.
  • Accepts multiple valid or optional values.
  • Can perform destructive, irreversible, or external actions.
  • Needs deterministic user confirmation for safety.
  • Involves multiple dependent parameters, multi-stage flows, or complex dependencies.
  • Includes entities or objects with potential ambiguity or conflicts.
  • Is part of multi-skill workflows needing parameter propagation.

3. Design principles

  1. Analyze first, ask later — only unresolved fields trigger questions.
  2. Safety-first — destructive or externally visible actions always require explicit confirmation.
  3. Compact and user-friendly menus — minimal interaction with maximum clarity.
  4. Structured parsing — numeric, boolean, and multi-stage replies are strictly validated.
  5. Dynamic flow — question count, options, and branching adapt to context and dependencies.
  6. Traceable and replayable — every user reply, decision, risk score, and timestamp is logged.
  7. Quantified risk — high, medium, low risk decisions determine confirmation level.
  8. Cross-skill context propagation — previously confirmed parameters reused automatically.

4. Core workflow

Stage A — Target and Dependency Analysis

  • Identify target skill(s), action, objects, and dependencies.
  • Determine required and optional fields, including multi-entity and cross-skill overlaps.
  • Extract candidate values, entity conflicts, and priority clashes.
  • Evaluate risk and execution confidence with graded levels (High/Medium/Low).
  • Generate a dependency graph for minimal interaction sequence.

Stage B — Parameter Normalization and Merging

  • Convert free-text or ambiguous input into structured internal parameters:

    • action, target_type, write_policy, mode, scope
    • entity type, relation type, validation mode
    • numeric, boolean, or free-text fields as required
  • Merge parameters from multiple sources with conflict resolution.

  • Track multiple entity references, historical option weightings, and cross-skill propagation.

Stage C — Confirmation Mode Selection

Choose one of:

  • DIRECT_EXECUTE — fully determined, safe parameters.
  • NUMERIC_CONFIRM — finite candidate sets with priority ordering.
  • BOOLEAN_CONFIRM — simple yes/no gates.
  • MULTI_STAGE_CONFIRM — dependent multi-step flows with conditional branching.
  • BLOCK_AND_CLARIFY — unresolved, contradictory, or unsafe inputs.

Stage D — Menu Generation and User Interaction

  • Generate one question per decision family.
  • Keep options short, mutually exclusive, stable, and ordered by likelihood or historical preference.
  • Include dynamic option filtering when prior answers affect subsequent choices.
  • Place safe defaults first when applicable.
  • Separate high-risk gates from normal parameters.
  • Provide contextual explanations for options to improve user comprehension.
  • Support “one-click confirm” for low-risk or common default parameters.

Stage E — Reply Parsing

  • Map numeric replies to questions in strict order.
  • Accept contiguous (123), comma-separated (1,2,3), or space-separated (1 2 3) formats.
  • Reject invalid, ambiguous, or incomplete replies; re-prompt safely.
  • Support weighted option history to influence ordering if applicable.

Stage F — Exception Handling

  • Handle invalid input, network interruption, or downstream skill failure.
  • Provide rollback for partially confirmed parameters.
  • Prompt user to retry or adjust choices as necessary.
  • Log exceptions for audit and debugging.

Stage G — Handoff

  • Emit normalized parameter summary in structured format (JSON schema recommended).
  • Include risk score, decision chain, and timestamp.
  • Pass validated parameters to downstream skill.
  • Avoid repeating confirmed questions by reusing cross-skill context.
  • Optional: provide natural-language summary or table visualization for user confirmation.

5. Question and menu rules

  • Titles are never numbered; options are.
  • One question = one decision family.
  • Ideal option count: 2–5; maximum: 9.
  • Safe defaults first; unknowns never guessed.
  • Multi-stage flows split decisions when necessary.
  • Optional fields omitted when derivable or non-impactful.
  • Dynamic adjustments based on dependencies and historical usage.

6. Confirmation modes

6.1 Numeric Confirmation

Finite candidate sets:

  target_type?
    1. Person
    2. Project
    3. Task

6.2 Boolean Confirmation

Single yes/no:

  Do you want to continue?
    1. Yes
    2. No

6.3 Multi-stage Confirmation

Dependent decision flows:

  1. Action selection.
  2. Action-specific parameters.
  3. Risk-sensitive and conditional options.
  4. Optional cross-skill propagated parameters.

6.4 Block and Clarify

  • Missing critical data.
  • Contradictory, invalid, or conflicting candidate options.
  • High-risk or destructive potential.
  • Excessive choices that impair reliable confirmation.

7. Parsing rules

  • Map digits strictly in order.
  • Accept contiguous or separated digits.
  • Reject replies shorter/longer than question count.
  • Do not infer missing values.
  • Re-prompt on invalid or ambiguous inputs.

8. Risk and safety policies

  • Quantify risk as High/Medium/Low for each downstream action.

  • Raise confirmation level when actions can:

    • Overwrite, delete, or replace existing data.
    • Modify shared state or external systems.
    • Publish, replicate, or sync content.
    • Trigger irreversible or costly operations.
    • Access secrets or sensitive resources.
  • Never auto-confirm destructive or externally visible actions.

9. Parameter classes

  • Enumerations — numeric menus for discrete choices.
  • Booleans — 1/2 for yes/no decisions.
  • Scalars — numeric or bounded values when possible.
  • Entity references — convert ambiguous objects into numbered options with conflict detection.
  • Free text — only when stable choice sets are unavailable.
  • Cross-skill parameters — propagate confirmed values to downstream skills.

10. Menu quality standards

  • Short, stable, mutually exclusive.
  • Easy to answer and parse.
  • Aligned with actual target skill schema.
  • Avoid combining unrelated decisions unless required.
  • Dynamic adjustment based on prior answers, dependencies, and historical usage.

11. Logging, traceability, and audit

  • Record every confirmation step with timestamps.
  • Store normalized parameter sets in structured format (JSON schema recommended).
  • Maintain replayable decision chains including risk scores, branching, and cross-skill context.
  • Optional verbose mode for debugging complex multi-stage flows.
  • Log exceptions, retries, and rollback events for full auditability.

12. Extensibility and automation

  • Integrate new downstream skills via schema metadata.
  • No core logic changes required.
  • Support multiple confirmation modes per skill.
  • Enable conditional and multi-stage branching.
  • Support historical option ranking for context-aware ordering.
  • Cross-skill parameter propagation to minimize redundant queries.
  • Parameter templates for batch or repeated skill execution.
  • Automated confirmation mode selection based on risk and history.

13. Recommended generation order

  1. Action
  2. Risk-sensitive gates
  3. Required entity type
  4. Required relations
  5. Enumerated fields
  6. Optional modifiers
  7. Nice-to-have preferences
  8. Cross-skill propagated parameters

14. Example flows

14.1 Ontology skill

  action?
    1. create
    2. query
    3. relate
    4. validate
  
  target_type?
    1. Person
    2. Project
    3. Task
    4. Event
    5. Document
  
  write_policy?
    1. append
    2. merge
    3. dry_run

14.2 Boolean gate

  This action may overwrite content.
  
  Do you want to continue?
    1. Yes
    2. No

14.3 Multi-stage with dynamic branching

Stage 1:

  action?
    1. create
    2. query

Stage 2 (conditional based on Stage 1):

  target_type?
    1. Task
    2. Project
    3. Document
  
  write_policy?
    1. append
    2. merge
    3. dry_run

Stage 3 (risk-dependent and propagated):

  overwrite_existing_data?
    1. Yes
    2. No

  propagate_previous_parameter?
    1. Use prior confirmation
    2. Reconfirm

15. Practical objectives

  • Ensure deterministic downstream skill execution: inspect → normalize → confirm → execute.
  • Merge multi-source and cross-skill parameters safely.
  • Never guess missing parameters; always expose uncertainty.
  • Maintain high safety for destructive or externally visible operations.
  • Support complex multi-stage, conditional, and batch workflows efficiently.
  • Provide traceable and auditable decision chains.

16. Implementation recommendations

  • Integrate as a mandatory preflight hook.
  • Automatically analyze downstream skill schema before menu generation.
  • Maintain dynamic registry of parameter requirements per skill.
  • Support shorthand numeric input with strict validation.
  • Cascade multi-stage confirmation when decisions impact subsequent options.
  • Include risk grading, weighted historical choices, and propagated parameters.
  • Fail-safe mode blocks execution if ambiguity or conflict persists.
  • Provide structured output format (JSON schema recommended) for downstream skills.
  • Support parameter templates for batch execution and automated confirmation.

17. Summary

This skill provides a comprehensive, safe, flexible, user-friendly, and practical confirmation layer:

  • Validates, merges, and normalizes all parameters.
  • Resolves ambiguity, conflicts, priority, and cross-skill dependencies before execution.
  • Supports multi-stage, multi-entity, conditional, and batch workflows.
  • Structures user decisions clearly with auditability, replayability, and context propagation.
  • Extensible to new skills and adaptable to evolving workflows.