Can an AppleScript write to a Notes.app document?
Notes is scriptable, and the dictionary can be opened with Script Editor for details.

There's also a lengthy tutorial here.

Although I've not tested it with iCloud, you should be able to set the account, and create a note in that account.

Simplifying the example on that page, and using my Exchange account, I was able to create the note using this script:

tell application "Notes"
  tell account "Exchange"
    make new note at folder "Notes" with properties {name:"this is a test", body:"and more text"}
  end tell
end tell


To get the contents of an existing note, in order to modify it:

tell application "Notes"
  tell account "Exchange"
    tell folder "Notes"
      get body of note "this is a test"
    end tell
  end tell
end tell


And, to modify the content:

tell application "Notes"
  tell account "Exchange"
    tell folder "Notes"
      set body of note "this is a test" to "reset the body text"
    end tell
  end tell
end tell