← 返回 Skills 市场
tomgranot

Cleanup Workflows

作者 TomGranot · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
98
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cleanup-workflows
功能描述
Audit and remove inactive, test, or deprecated workflows from HubSpot. Identifies workflows that have never enrolled contacts, workflows turned off for 90+ d...
使用说明 (SKILL.md)

Cleanup Workflows

Audit HubSpot workflows to remove dead weight. Unused workflows clutter the automation dashboard and make it harder to understand what is actually running.

Prerequisites

  • HubSpot API token in .env
  • Python with hubspot-api-client installed via uv
  • Note: The Workflows API may return 403 on some plan tiers. If so, audit manually in HubSpot UI under Automation > Workflows.

Step-by-Step Instructions

Stage 1: Before — Inventory All Workflows

Pull all workflows. The Automation API endpoint for workflows:

import requests

headers = {"Authorization": f"Bearer {os.getenv('HUBSPOT_API_TOKEN')}"}
response = requests.get(
    "https://api.hubapi.com/automation/v4/flows",
    headers=headers,
    params={"limit": 100}
)
workflows = response.json()

For each workflow, record: ID, name, enabled status, type, enrollment count, created date, last updated date.

Stage 2: Execute — Identify Candidates for Deletion

Flag workflows matching any of these criteria:

  1. Turned off for 90+ days with no plans to reactivate
  2. Zero enrollments ever (likely test or abandoned drafts)
  3. Test workflows (names containing "test", "temp", "copy of", "draft")
  4. Superseded workflows replaced by newer versions
  5. Error state workflows that have been failing consistently

Before deleting, check:

  • Does the workflow feed into another workflow (via enrollment trigger)?
  • Does the workflow set properties that other workflows depend on?
  • Is there any documentation referencing this workflow?

Stage 3: After — Delete and Document

  1. Turn off workflows first, wait one week, then delete if no issues arise.
  2. Document deleted workflows in a cleanup log (name, purpose, reason for deletion).
  3. Notify workflow owners before deletion.

Stage 4: Rollback

  • Deleted workflows cannot be restored.
  • Before deleting, screenshot or document the workflow logic (triggers, actions, branches) so it can be recreated if needed.
  • HubSpot retains workflow activity history on contact records even after the workflow is deleted.

Tips

  • Use folders in the workflows dashboard to organize by team, purpose, or status.
  • Prefix draft/test workflows with "[TEST]" so they are easy to identify later.
  • Review workflows quarterly as part of the database cleanup routine.
安全使用建议
This skill’s instructions legitimately require a HubSpot API token and call HubSpot’s Workflows API, but the skill metadata fails to declare that credential — an important mismatch. Before using or granting any token: (1) verify the author/source (homepage is missing), (2) prefer using a least-privilege or test HubSpot API token (restrict scopes; avoid full-admin tokens), (3) review the exact code you will run (the SKILL.md has small typos/mismatches: mentions hubspot-api-client but example uses requests; 'uv' looks wrong), (4) don't run delete operations until you confirm required API scopes and have backups/documentation, and (5) consider running the audit read-only first to produce a candidate list and only perform deletions after human review. If possible, ask the publisher to update the skill metadata to declare HUBSPOT_API_TOKEN (primaryEnv) and to provide explicit delete code with recommended scopes and safety checks.
功能分析
Type: OpenClaw Skill Name: cleanup-workflows Version: 1.0.0 The skill is a legitimate administrative utility designed to audit and remove inactive HubSpot workflows. The provided Python snippet in SKILL.md uses the official HubSpot API endpoint and standard environment variable handling for authentication, with no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
The SKILL.md describes auditing and deleting HubSpot workflows and the instructions use the HubSpot Workflows API — that aligns with the stated purpose. However, the skill metadata declares no required environment variables or primary credential, while the instructions explicitly require a HubSpot API token in a .env file. This mismatch (a core credential required by the runtime but not declared) is incoherent and should be clarified.
Instruction Scope
The instructions tell the agent to read a HubSpot API token from environment (.env / os.getenv) and call api.hubapi.com automation endpoints — those actions are appropriate for the stated task. But the SKILL.md also references installing 'hubspot-api-client' while the example uses requests/os.getenv (and the snippet omits the os import). The doc also instructs deletion of workflows (sensitive write actions) but does not include example safe-delete code, nor does it enumerate required API scopes. These are gaps that increase risk if you run the steps without review.
Install Mechanism
This is an instruction-only skill with no install spec or code files, so there is no installer risk. There is a minor inconsistency: the prereqs say 'hubspot-api-client' installed via 'uv' (likely a typo) even though the shown sample uses requests. No downloads or arbitrary URLs are suggested.
Credentials
The runtime requires a HubSpot API token to call/modify workflows, which is expected for the task — but the skill registry lists no required env vars or primary credential. The absence of declared credential requirements in metadata is concerning because it prevents automated permission checks and hides that a high-privilege token is needed. The instructions do not recommend limiting token scopes or using a read-only/test account prior to deletion operations.
Persistence & Privilege
The skill does not request persistent installation, system paths, or 'always' inclusion. It is user-invocable and can be invoked autonomously (the platform default), which is normal; nothing indicates elevated or persistent privileges beyond normal API access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cleanup-workflows
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cleanup-workflows 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of cleanup-workflows skill. - Audits HubSpot workflows to identify and remove inactive, test, or deprecated workflows. - Flags workflows based on inactivity, zero enrollments, test/draft naming, superseded status, and consistent errors. - Provides step-by-step instructions for inventory, review, deletion, documentation, and rollback precautions. - Includes tips for organizing and maintaining a clean HubSpot workflow environment.
元数据
Slug cleanup-workflows
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Cleanup Workflows 是什么?

Audit and remove inactive, test, or deprecated workflows from HubSpot. Identifies workflows that have never enrolled contacts, workflows turned off for 90+ d... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 98 次。

如何安装 Cleanup Workflows?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cleanup-workflows」即可一键安装,无需额外配置。

Cleanup Workflows 是免费的吗?

是的,Cleanup Workflows 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cleanup Workflows 支持哪些平台?

Cleanup Workflows 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cleanup Workflows?

由 TomGranot(@tomgranot)开发并维护,当前版本 v1.0.0。

💬 留言讨论