task-logger
npx skills add https://github.com/pseudojo/personal-works --skill task-logger
Agent 安装分布
Skill 文档
Task Logger Workflow
This skill ensures that a detailed, structured log of all actions is maintained for every task. Adherence to this workflow is mandatory.
1. Task Initialization
At the very beginning of any multi-step task, you must define the task’s scope and prepare for logging.
-
Create Task Identifiers:
TASKLOG_ID: Create a unique ID for the task using a timestamp. Format:TASKLOG-$(date -u +"%Y%m%d-%H%M%S").TASK_DESCRIPTION: Create a concise, one-line summary of the user’s core request. If using a task management tool likebacklog, use the official task title.LOG_FILE: Define the path to the log file. Format:./tasklog/${TASKLOG_ID}.md.
-
Export Identifiers: Export these variables to make them available for the duration of the task.
export TASKLOG_ID="TASKLOG-..." export TASK_DESCRIPTION="..." export LOG_FILE="./tasklog/${TASKLOG_ID}.md"
2. Logging Each Action (The Loop)
For every tool you execute (run_shell_command, replace, write_file, etc.), you must follow this sequence:
Step 2.1: Formulate Log Content
Before running the command, determine the “what” and “why”.
ACTION_SUMMARY: Write a single, clear sentence describing the immediate goal of the action. (e.g., “List the contents of the source directory to identify the main application file.”)ACTION_DETAILS: Write a multi-line string explaining the context, reasoning, and details. Use bullet points for clarity. This is where you explain why you are taking this step.
Step 2.2: Execute and Capture
- Prepare the Command: The shell command or tool call you are about to run.
- Execute the Command: Run the command using
run_shell_commandor another tool. - Capture the Output: Save the entire
stdoutandstderrfrom the tool’s result.
Step 2.3: Log the Action
You must construct the log entry manually and append it to the log file.
If you are in an environment without a shell, you must construct the log entry manually and append it to the log file.
- Read the existing log file to see its current content.
- Construct the new log entry by following the template below.
- Append the new entry to the
LOG_FILE.
Log Entry Template:
---
**Task:** {TASK_DESCRIPTION}
**Timestamp:** {YYYY-MM-DDTHH:MM:SSZ}
**Date:** {YYYY-MM-DD}
**Action:**
{ACTION_SUMMARY}
**Details:**
{LOG_DETAILS}
**Command:**
```shell
{LOG_COMMAND}
```
**Output:**
```text
{LOG_OUTPUT}
```
How to fill the template:
{TASK_DESCRIPTION}: The variable you defined in the initialization step.{TIMESTAMP}&{DATE}: Generate these using the current UTC time.{ACTION_SUMMARY}: The single-sentence summary of the action.{LOG_DETAILS}: The detailed, multi-line explanation.{LOG_COMMAND}: The exact command you executed.{LOG_OUTPUT}: The complete output from the command.
Ensure you append this to the $LOG_FILE correctly. The --- separator is crucial for separating entries.
3. Reference Examples
For complete examples of well-formatted log files for different scenarios, always refer to the files in the references/ directory.
references/example-log-analysis-task.mdreferences/example-log-data-arrow-ipc.mdreferences/example-log-data-clean-data.mdreferences/example-log-data-dask-dataframe.mdreferences/example-log-data-generate-plot.mdreferences/example-log-data-geopandas-plot.mdreferences/example-log-data-json-read.mdreferences/example-log-data-jupyter-cell.mdreferences/example-log-data-numpy-array.mdreferences/example-log-data-pandas-groupby.mdreferences/example-log-data-parquet-read.mdreferences/example-log-data-plotly-plot.mdreferences/example-log-data-read-csv.mdreferences/example-log-data-scikit-learn-train.mdreferences/example-log-data-scipy-optimize.mdreferences/example-log-data-seaborn-plot.mdreferences/example-log-data-sql-query-pandas.mdreferences/example-log-data-statsmodels-ols.mdreferences/example-log-data-xml-parse.mdreferences/example-log-gen-art-prompt.mdreferences/example-log-gen-bird-watching-log.mdreferences/example-log-gen-blog-post.mdreferences/example-log-gen-board-game-find.mdreferences/example-log-gen-book-flight.mdreferences/example-log-gen-book-summary.mdreferences/example-log-gen-brand-voice-guide.mdreferences/example-log-gen-budget-create.mdreferences/example-log-gen-business-plan.mdreferences/example-log-gen-calendar-event.mdreferences/example-log-gen-character-backstory.mdreferences/example-log-gen-character-flaws.mdreferences/example-log-gen-chess-opening.mdreferences/example-log-gen-cocktail-recipe.mdreferences/example-log-gen-cold-email-outreach.mdreferences/example-log-gen-color-palette.mdreferences/example-log-gen-company-name.mdreferences/example-log-gen-competitive-analysis.mdreferences/example-log-gen-currency-convert.mdreferences/example-log-gen-dialogue-writing.mdreferences/example-log-gen-dnd-encounter.mdreferences/example-log-gen-dnd-inventory.mdreferences/example-log-gen-elevator-pitch.mdreferences/example-log-gen-eloquent-paraphrase.mdreferences/example-log-gen-email-etiquette.mdreferences/example-log-gen-explain-concept.mdreferences/example-log-gen-fictional-map-locations.mdreferences/example-log-gen-find-hotel.mdreferences/example-log-gen-fitness-goal-setting.mdreferences/example-log-gen-formal-letter.mdreferences/example-log-gen-garden-layout.mdreferences/example-log-gen-gift-ideas.mdreferences/example-log-gen-guitar-chords.mdreferences/example-log-gen-home-brewing-recipe.mdreferences/example-log-gen-invoice-create.mdreferences/example-log-gen-job-description.mdreferences/example-log-gen-knowledge-q.mdreferences/example-log-gen-kpi-brainstorm.mdreferences/example-log-gen-language-learning.mdreferences/example-log-gen-legal-disclaimer.mdreferences/example-log-gen-loan-payment.mdreferences/example-log-gen-logo-concept.mdreferences/example-log-gen-magic-trick-learn.mdreferences/example-log-gen-market-research-plan.mdreferences/example-log-gen-marketing-slogans.mdreferences/example-log-gen-meal-plan.mdreferences/example-log-gen-meeting-minutes.mdreferences/example-log-gen-movie-recs.mdreferences/example-log-gen-organize-photos.mdreferences/example-log-gen-packing-list.mdreferences/example-log-gen-performance-review.mdreferences/example-log-gen-photo-editing-plan.mdreferences/example-log-gen-plan-trip.mdreferences/example-log-gen-plant-identification.mdreferences/example-log-gen-podcast-outline.mdreferences/example-log-gen-podcast-summary.mdreferences/example-log-gen-presentation-outline.mdreferences/example-log-gen-press-inquiry-response.mdreferences/example-log-gen-press-release.mdreferences/example-log-gen-product-description.mdreferences/example-log-gen-pros-cons-list.mdreferences/example-log-gen-recipe-find.mdreferences/example-log-gen-resume-summary.mdreferences/example-log-gen-second-brain.mdreferences/example-log-gen-set-reminder.mdreferences/example-log-gen-social-media-post.mdreferences/example-log-gen-solve-math.mdreferences/example-log-gen-song-chorus.mdreferences/example-log-gen-song-lyrics.mdreferences/example-log-gen-speech-writing.mdreferences/example-log-gen-stakeholder-update.mdreferences/example-log-gen-story-premise.mdreferences/example-log-gen-subscription-audit.mdreferences/example-log-gen-summarize-doc.mdreferences/example-log-gen-swot-analysis.mdreferences/example-log-gen-time-blocking.mdreferences/example-log-gen-todo-list.mdreferences/example-log-gen-translate-text.mdreferences/example-log-gen-user-persona.mdreferences/example-log-gen-ux-copywriting.mdreferences/example-log-gen-value-proposition.mdreferences/example-log-gen-video-game-concept.mdreferences/example-log-gen-video-script-intro.mdreferences/example-log-gen-web-search.mdreferences/example-log-gen-workout-plan.mdreferences/example-log-gen-write-email.mdreferences/example-log-gen-write-poem.mdreferences/example-log-python-task.mdreferences/example-log-skill-install-task.mdreferences/example-log-sw-angular-component.mdreferences/example-log-sw-api-graphql.mdreferences/example-log-sw-api-test-curl.mdreferences/example-log-sw-csharp-run.mdreferences/example-log-sw-debug-script.mdreferences/example-log-sw-django-model.mdreferences/example-log-sw-eslint-run.mdreferences/example-log-sw-flask-app.mdreferences/example-log-sw-git-branch.mdreferences/example-log-sw-git-commit.mdreferences/example-log-sw-git-log.mdreferences/example-log-sw-git-merge.mdreferences/example-log-sw-git-stash.mdreferences/example-log-sw-git-tag.mdreferences/example-log-sw-go-test.mdreferences/example-log-sw-kotlin-compile.mdreferences/example-log-sw-mypy-run.mdreferences/example-log-sw-new-feature.mdreferences/example-log-sw-npm-init.mdreferences/example-log-sw-pip-install-reqs.mdreferences/example-log-sw-poetry-add.mdreferences/example-log-sw-react-component.mdreferences/example-log-sw-refactor-code.mdreferences/example-log-sw-run-tests.mdreferences/example-log-sw-rust-build.mdreferences/example-log-sw-swift-build.mdreferences/example-log-sw-update-deps.mdreferences/example-log-sw-vite-dev.mdreferences/example-log-sw-vue-route.mdreferences/example-log-sw-webpack-build.mdreferences/example-log-sw-yarn-audit.mdreferences/example-log-sys-ansible-playbook.mdreferences/example-log-sys-aws-s3-ls.mdreferences/example-log-sys-azure-rg-create.mdreferences/example-log-sys-check-server.mdreferences/example-log-sys-cron-job.mdreferences/example-log-sys-disk-usage.mdreferences/example-log-sys-docker-build.mdreferences/example-log-sys-docker-compose-up.mdreferences/example-log-sys-dockerfile.mdreferences/example-log-sys-gcp-vm-create.mdreferences/example-log-sys-gh-actions-run.mdreferences/example-log-sys-jenkins-pipeline.mdreferences/example-log-sys-k8s-get-pods.mdreferences/example-log-sys-k8s-logs.mdreferences/example-log-sys-k8s-scale.mdreferences/example-log-sys-manage-cloud.mdreferences/example-log-sys-ping-test.mdreferences/example-log-sys-prometheus-query.mdreferences/example-log-sys-ssh-key-gen.mdreferences/example-log-sys-systemd-status.mdreferences/example-log-sys-terraform-plan.mdreferences/example-log-sys-traceroute-test.mdreferences/example-log-sys-ufw-firewall.md