| name | get-current-date |
| description | Retrieves the current date in YYYY-MM-DD format. Use when the user needs to know today's date or requires the current date for any operation. |
| license | MIT |
| metadata | {"author":"agent-skills-poc","version":"1.0","category":"utility"} |
Get Current Date Skill
This skill retrieves the current date and returns it as a string in YYYY-MM-DD format.
When to Use
Use this skill when:
- The user asks for today's date
- The user needs the current date for logging, timestamps, or records
- The user mentions terms like "what's today's date", "current date", "today", or "what day is it"
- Date information is needed for any operation
Instructions
-
Execute the Node.js script to get the current date:
- Run the script located at
scripts/get_date.js
- The script will return the current date in YYYY-MM-DD format
-
Return the date as a string in the format YYYY-MM-DD
-
Ask for confirmation that the date is correct
-
Present the result clearly to the user
Examples
Example 1: Simple date request
Input: "What's today's date?"
Steps:
- Execute the get_date.js script
- Retrieve the date (e.g., "2026-01-12")
- Present to user
Output: "The current date is 2026-01-12. Is this date correct?"
Example 2: Date needed for logging
Input: "I need today's date for my log entry"
Steps:
- Execute the get_date.js script
- Retrieve the date (e.g., "2026-01-12")
- Present to user
Output: "Today's date is 2026-01-12. Is this date correct?"
Script Details
The skill uses a Node.js script (scripts/get_date.js) that:
- Gets the current date using JavaScript's
Date object
- Formats it as YYYY-MM-DD
- Returns the date as a string to stdout
Tips
- Always confirm with the user that the date is correct
- The date is based on the system's local time
- The format is always YYYY-MM-DD (ISO 8601 standard)
- The returned value is a string, not a Date object