Skill: intelligencex-tools-authoring
Use this skill when changing files in IntelligenceX.Tools/**, especially when adding new tools or consolidating helper logic.
Trigger Phrases
- "new tool"
- "tooling refactor"
- "reduce duplication in tools"
- "centralize tool helpers"
- "tool contract cleanup"
Strict Execution Order
- Identify target package and existing base helpers.
- Reuse shared helper paths first (
ToolBase,ToolQueryHelpers,ToolPipeline, package base helpers). - Build typed request binder (
ToolRequestBinder+ToolRequestBindingResult<TRequest>). - Implement tool/refactor changes with no output contract drift, using
ToolResultV2for output envelopes. - Add or update tests for helper behavior and edge cases.
- Run targeted build/tests for changed tool packages.
- Summarize reusable pattern changes for future tools.
Commands
- Targeted build:
dotnet build IntelligenceX.Tools/IntelligenceX.Tools.ADPlayground/IntelligenceX.Tools.ADPlayground.csproj -c Releasedotnet build IntelligenceX.Tools/IntelligenceX.Tools.EventLog/IntelligenceX.Tools.EventLog.csproj -c Releasedotnet build IntelligenceX.Tools/IntelligenceX.Tools.System/IntelligenceX.Tools.System.csproj -c Release
- Targeted tests:
dotnet test IntelligenceX.Tools/IntelligenceX.Tools.Tests/IntelligenceX.Tools.Tests.csproj -c Release
- Full tool solution gate:
dotnet test IntelligenceX.Tools/IntelligenceX.Tools.sln -c Release
Fail-Fast Rules
- Do not add package-specific duplicate helpers when a shared helper exists.
- Do not change
error_code/metadata/table view contracts without explicit intent. - Do not add
max_resultsmetadata with directmeta.Add("max_results", ...); useAddMaxResultsMeta(...). - Keep mass normalization (for example line endings) in a dedicated cleanup PR, not mixed with behavior changes.
- Prefer typed request models over direct
arguments?.Get...reads in new/refactored tools. - Prefer middleware composition over inline precondition blocks when preconditions are reusable.
- For AD tools with required
domain_name, use canonical helpers (TryReadRequiredDomainQueryRequest,TryReadPolicyAttributionToolRequest,ExecuteDomainRowsViewTool,ExecutePolicyAttributionTool).
References
InternalDocs/agent-playbooks/tool-authoring-playbook.mdtemplates/tool-pipeline-template.md